aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-08-02 23:12:34 +0700
committerSergey M․ <dstftw@gmail.com>2017-08-02 23:12:34 +0700
commit8cda78ef72c52c0424ddf90c22105dbc3b1d16f3 (patch)
treeedfa8dcba4ddd72159315ab1456f543057da0321 /test
parent9118c9f18a43a2f3e4814fcc02ac8e5180077df3 (diff)
downloadyoutube-dl-8cda78ef72c52c0424ddf90c22105dbc3b1d16f3.zip
youtube-dl-8cda78ef72c52c0424ddf90c22105dbc3b1d16f3.tar.gz
youtube-dl-8cda78ef72c52c0424ddf90c22105dbc3b1d16f3.tar.bz2
[test_YoutubeDL] Add a test for #10083
Diffstat (limited to 'test')
-rw-r--r--test/test_YoutubeDL.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py
index 4af14f9..e70cbcd 100644
--- a/test/test_YoutubeDL.py
+++ b/test/test_YoutubeDL.py
@@ -371,6 +371,19 @@ class TestFormatSelection(unittest.TestCase):
ydl = YDL({'format': 'best[height>360]'})
self.assertRaises(ExtractorError, ydl.process_ie_result, info_dict.copy())
+ def test_format_selection_issue_10083(self):
+ # See https://github.com/rg3/youtube-dl/issues/10083
+ formats = [
+ {'format_id': 'regular', 'height': 360, 'url': TEST_URL},
+ {'format_id': 'video', 'height': 720, 'acodec': 'none', 'url': TEST_URL},
+ {'format_id': 'audio', 'vcodec': 'none', 'url': TEST_URL},
+ ]
+ info_dict = _make_result(formats)
+
+ ydl = YDL({'format': 'best[height>360]/bestvideo[height>360]+bestaudio'})
+ ydl.process_ie_result(info_dict.copy())
+ self.assertEqual(ydl.downloaded_info_dicts[0]['format_id'], 'video+audio')
+
def test_invalid_format_specs(self):
def assert_syntax_error(format_spec):
ydl = YDL({'format': format_spec})