]>
Raphaƫl G. Git Repositories - youtubedl/blob - test/test_postprocessors.py
addb69d6fa205f00f50a9a733d40d4a2ea928155
3 from __future__
import unicode_literals
5 # Allow direct execution
9 sys
.path
.insert(0, os
.path
.dirname(os
.path
.dirname(os
.path
.abspath(__file__
))))
11 from youtube_dl
.postprocessor
import MetadataFromTitlePP
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>.+)')