diff options
author | Sergey M. <dstftw@gmail.com> | 2015-08-06 00:04:40 +0600 |
---|---|---|
committer | Sergey M. <dstftw@gmail.com> | 2015-08-06 00:04:40 +0600 |
commit | 47f53ad95884d92c8e5be6ba5c35e2955b941b0c (patch) | |
tree | 0661c4d1aff57e428c1051e49cb96aef4b1b015c /test | |
parent | c73cdd800f0dc7b465ac0b36d338875bb80c23aa (diff) | |
parent | 232541df441741d3d55605f03e28ec3c34249a5b (diff) |
Merge pull request #6463 from jaimeMF/format_spec_fix_dashes
[YoutubeDL] format spec: correctly handle dashes and other unused operators
Diffstat (limited to 'test')
-rw-r--r-- | test/test_YoutubeDL.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 9a3c28f8c..0388c0bf3 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -105,6 +105,7 @@ class TestFormatSelection(unittest.TestCase): def test_format_selection(self): formats = [ {'format_id': '35', 'ext': 'mp4', 'preference': 1, 'url': TEST_URL}, + {'format_id': 'example-with-dashes', 'ext': 'webm', 'preference': 1, 'url': TEST_URL}, {'format_id': '45', 'ext': 'webm', 'preference': 2, 'url': TEST_URL}, {'format_id': '47', 'ext': 'webm', 'preference': 3, 'url': TEST_URL}, {'format_id': '2', 'ext': 'flv', 'preference': 4, 'url': TEST_URL}, @@ -136,6 +137,11 @@ class TestFormatSelection(unittest.TestCase): downloaded = ydl.downloaded_info_dicts[0] self.assertEqual(downloaded['format_id'], '35') + ydl = YDL({'format': 'example-with-dashes'}) + ydl.process_ie_result(info_dict.copy()) + downloaded = ydl.downloaded_info_dicts[0] + self.assertEqual(downloaded['format_id'], 'example-with-dashes') + def test_format_selection_audio(self): formats = [ {'format_id': 'audio-low', 'ext': 'webm', 'preference': 1, 'vcodec': 'none', 'url': TEST_URL}, |