projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[travis] Allow download tests to fail and fast finish
[youtube-dl]
/
test
/
test_YoutubeDL.py
diff --git
a/test/test_YoutubeDL.py
b/test/test_YoutubeDL.py
index 5ac34e6635102092936cfdefd8f4b62a75eeeae0..4af92fbd4b8ac0cff84b290bc737f173cc6b34ca 100644
(file)
--- 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({'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': '-'})
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')
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):
class TestYoutubeDL(unittest.TestCase):
@@
-773,6
+779,9
@@
class TestYoutubeDL(unittest.TestCase):
result = get_ids({'playlist_items': '3-10'})
self.assertEqual(result, [3, 4])
result = get_ids({'playlist_items': '3-10'})
self.assertEqual(result, [3, 4])
+ result = get_ids({'playlist_items': '2-4,3-4,3'})
+ self.assertEqual(result, [2, 3, 4])
+
def test_urlopen_no_file_protocol(self):
# see https://github.com/rg3/youtube-dl/issues/8227
ydl = YDL()
def test_urlopen_no_file_protocol(self):
# see https://github.com/rg3/youtube-dl/issues/8227
ydl = YDL()