about summary refs log tree commit diff
path: root/test/test_YoutubeDL.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-19 00:04:26 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-19 00:04:26 +0600
commit4c3b16d5d1bf4806693d2895928ac1b03585b2b2 (patch)
tree349ddf822e9aba71910aedcef5ba92b61f5c58e1 /test/test_YoutubeDL.py
parentd5aacf9a90e0855976401b6085ac56b66ca09d12 (diff)
downloadyoutube-dl-4c3b16d5d1bf4806693d2895928ac1b03585b2b2.tar.gz
youtube-dl-4c3b16d5d1bf4806693d2895928ac1b03585b2b2.tar.xz
youtube-dl-4c3b16d5d1bf4806693d2895928ac1b03585b2b2.zip
[test_YoutubeDL] Add test for format_id format selection
Diffstat (limited to 'test/test_YoutubeDL.py')
-rw-r--r--test/test_YoutubeDL.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py
index efbee3b71..ca25025e2 100644
--- a/test/test_YoutubeDL.py
+++ b/test/test_YoutubeDL.py
@@ -222,6 +222,11 @@ class TestFormatSelection(unittest.TestCase):
         downloaded = ydl.downloaded_info_dicts[0]
         self.assertEqual(downloaded['format_id'], 'dash-video-low')
 
+        ydl = YDL({'format': 'bestvideo[format_id^=dash][format_id$=low]'})
+        ydl.process_ie_result(info_dict.copy())
+        downloaded = ydl.downloaded_info_dicts[0]
+        self.assertEqual(downloaded['format_id'], 'dash-video-low')
+
         formats = [
             {'format_id': 'vid-vcodec-dot', 'ext': 'mp4', 'preference': 1, 'vcodec': 'avc1.123456', 'acodec': 'none', 'url': TEST_URL},
         ]