diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-10-11 23:45:03 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-10-11 23:48:05 +0700 |
commit | af0f74288dc1b46147bc8f6b5692d2a21c6e178b (patch) | |
tree | 5f91347c32048f1f635608bd6cdc42db40ff075b /test/test_YoutubeDL.py | |
parent | 9e38dbb19ca6874c7350647ea2883d5bbb3b50a1 (diff) |
[YoutubeDL] Improve _default_format_spec (closes #14461)
Diffstat (limited to 'test/test_YoutubeDL.py')
-rw-r--r-- | test/test_YoutubeDL.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index db936bfb8..4af92fbd4 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -466,12 +466,18 @@ class TestFormatSelection(unittest.TestCase): ydl = YDL({'simulate': True}) self.assertEqual(ydl._default_format_spec({}), 'bestvideo+bestaudio/best') + ydl = YDL({'is_live': True}) + self.assertEqual(ydl._default_format_spec({}), 'best/bestvideo+bestaudio') + + ydl = YDL({'simulate': True, 'is_live': True}) + self.assertEqual(ydl._default_format_spec({}), 'bestvideo+bestaudio/best') + ydl = YDL({'outtmpl': '-'}) - self.assertEqual(ydl._default_format_spec({}), 'best') + self.assertEqual(ydl._default_format_spec({}), 'best/bestvideo+bestaudio') ydl = YDL({}) self.assertEqual(ydl._default_format_spec({}, download=False), 'bestvideo+bestaudio/best') - self.assertEqual(ydl._default_format_spec({'is_live': True}), 'best') + self.assertEqual(ydl._default_format_spec({'is_live': True}), 'best/bestvideo+bestaudio') class TestYoutubeDL(unittest.TestCase): |