* Remove the 'songtitle' field, 'title' can be used instead. * Remove newlines in the help text, for consistency with other options. * Add 'from __future__ import unicode_literals'. * Call '__init__' from the parent class. * Add test for the format_to_regex methodmaster
parent
e7db87f700
commit
88cf6fb368
4 changed files with 25 additions and 11 deletions
@ -0,0 +1,17 @@ |
||||
#!/usr/bin/env python |
||||
|
||||
from __future__ import unicode_literals |
||||
|
||||
# Allow direct execution |
||||
import os |
||||
import sys |
||||
import unittest |
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
||||
|
||||
from youtube_dl.postprocessor import MetadataFromTitlePP |
||||
|
||||
|
||||
class TestMetadataFromTitle(unittest.TestCase): |
||||
def test_format_to_regex(self): |
||||
pp = MetadataFromTitlePP(None, '%(title)s - %(artist)s') |
||||
self.assertEqual(pp._titleregex, '(?P<title>.+)\ \-\ (?P<artist>.+)') |
Loading…
Reference in new issue