]> Raphaƫl G. Git Repositories - youtubedl/blob - test/test_postprocessors.py
Update changelog
[youtubedl] / test / test_postprocessors.py
1 #!/usr/bin/env python
2
3 from __future__ import unicode_literals
4
5 # Allow direct execution
6 import os
7 import sys
8 import unittest
9 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
10
11 from youtube_dl.postprocessor import MetadataFromTitlePP
12
13
14 class TestMetadataFromTitle(unittest.TestCase):
15 def test_format_to_regex(self):
16 pp = MetadataFromTitlePP(None, '%(title)s - %(artist)s')
17 self.assertEqual(pp._titleregex, '(?P<title>.+)\ \-\ (?P<artist>.+)')