aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-01-28 22:22:43 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-01-28 22:22:43 +0800
commit39c10a2b6ef05ad7320f578fb8f0cd2ef25ed181 (patch)
treeb6b2a8e389315da266a37814021a40666e77555f /test
parented7cd1e859cf97e975a28a5e8c58a1d1aca819fe (diff)
parentb913348d5fa1130ab1c65576e458407f262df6e1 (diff)
downloadyoutube-dl-39c10a2b6ef05ad7320f578fb8f0cd2ef25ed181.tar.xz
Merge pull request #8346 from dyn888/dyn888-regex-1
Regex pattern update to match more codecs (fixes #6858)
Diffstat (limited to 'test')
-rw-r--r--test/test_YoutubeDL.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py
index 0caa43843..b53cfbe78 100644
--- a/test/test_YoutubeDL.py
+++ b/test/test_YoutubeDL.py
@@ -221,6 +221,16 @@ class TestFormatSelection(unittest.TestCase):
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},
+ ]
+ info_dict = _make_result(formats)
+
+ ydl = YDL({'format': 'bestvideo[vcodec=avc1.123456]'})
+ ydl.process_ie_result(info_dict.copy())
+ downloaded = ydl.downloaded_info_dicts[0]
+ self.assertEqual(downloaded['format_id'], 'vid-vcodec-dot')
+
def test_youtube_format_selection(self):
order = [
'38', '37', '46', '22', '45', '35', '44', '18', '34', '43', '6', '5', '36', '17', '13',