]> jfr.im git - yt-dlp.git/blame - test/test_postprocessors.py
[ChangeLog] Update after #13494
[yt-dlp.git] / test / test_postprocessors.py
CommitLineData
88cf6fb3
JMF
1#!/usr/bin/env python
2
3from __future__ import unicode_literals
4
5# Allow direct execution
6import os
7import sys
8import unittest
9sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
10
11from youtube_dl.postprocessor import MetadataFromTitlePP
12
13
14class 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>.+)')