projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3bef10a
)
[test_download] Match info dicts against tests before matching info file
author
Sergey M․
<dstftw@gmail.com>
Sat, 8 Apr 2017 07:10:12 +0000
(14:10 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 8 Apr 2017 07:10:12 +0000
(14:10 +0700)
test/test_download.py
patch
|
blob
|
history
diff --git
a/test/test_download.py
b/test/test_download.py
index 61015562dadc24028b95c9094c094cf8aaf031b1..5c5824d65a7063304253420100dc519f2d90940d 100644
(file)
--- a/
test/test_download.py
+++ b/
test/test_download.py
@@
-200,8
+200,9
@@
def generator(test_case, tname):
self.assertEqual(
test_case['playlist_duration_sum'], got_duration)
self.assertEqual(
test_case['playlist_duration_sum'], got_duration)
- for tc in test_cases:
- expect_value(self, res_dict['id'], tc['info_dict']['id'], 'id')
+ for tc_num, tc in enumerate(test_cases):
+ tc_res_dict = res_dict['entries'][tc_num] if is_playlist else res_dict
+ expect_info_dict(self, tc_res_dict, tc.get('info_dict', {}))
tc_filename = get_tc_filename(tc)
if not test_case.get('params', {}).get('skip_download', False):
self.assertTrue(os.path.exists(tc_filename), msg='Missing file ' + tc_filename)
tc_filename = get_tc_filename(tc)
if not test_case.get('params', {}).get('skip_download', False):
self.assertTrue(os.path.exists(tc_filename), msg='Missing file ' + tc_filename)