aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-07-23 00:12:01 +0700
committerSergey M․ <dstftw@gmail.com>2017-07-23 00:12:01 +0700
commit0017d9ad6de831384e74db14a821e4c94020c9ac (patch)
tree4bdba4445d9e65e389b51581819cc4c5fdd1857a /test
parent327c8364f11f23dd919e8009c6adb021c34054fa (diff)
[YoutubeDL] Improve default format specification (closes #13704)
Diffstat (limited to 'test')
-rw-r--r--test/test_YoutubeDL.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py
index e0decb81c..4af14f9db 100644
--- a/test/test_YoutubeDL.py
+++ b/test/test_YoutubeDL.py
@@ -449,6 +449,17 @@ class TestFormatSelection(unittest.TestCase):
pass
self.assertEqual(ydl.downloaded_info_dicts, [])
+ def test_default_format_spec(self):
+ ydl = YDL({'simulate': True})
+ self.assertEqual(ydl._default_format_spec({}), 'bestvideo+bestaudio/best')
+
+ ydl = YDL({'outtmpl': '-'})
+ self.assertEqual(ydl._default_format_spec({}), 'best')
+
+ ydl = YDL({})
+ self.assertEqual(ydl._default_format_spec({}, download=False), 'bestvideo+bestaudio/best')
+ self.assertEqual(ydl._default_format_spec({'is_live': True}), 'best')
+
class TestYoutubeDL(unittest.TestCase):
def test_subtitles(self):