X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=test%2Ftest_download.py;h=f1bccf58c5a2eaab0fbb8d60bb1185007eae0ee8;hb=b47bbac393be2b835ac5037def964f19305c28d4;hp=5877c42b3ac57d282df52259ba4ae9b1390e0859;hpb=bffbd5f03806836d5a55f65542ad6061a7a03ccb;p=youtube-dl diff --git a/test/test_download.py b/test/test_download.py index 5877c42b3..f1bccf58c 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -98,7 +98,7 @@ def generator(test_case): for tc in test_cases: if not test_case.get('params', {}).get('skip_download', False): - self.assertTrue(os.path.exists(tc['file'])) + self.assertTrue(os.path.exists(tc['file']), msg='Missing file ' + tc['file']) self.assertTrue(tc['file'] in finished_hook_called) self.assertTrue(os.path.exists(tc['file'] + '.info.json')) if 'md5' in tc: @@ -107,11 +107,7 @@ def generator(test_case): with io.open(tc['file'] + '.info.json', encoding='utf-8') as infof: info_dict = json.load(infof) for (info_field, value) in tc.get('info_dict', {}).items(): - if value.startswith('md5:'): - md5_info_value = hashlib.md5(info_dict.get(info_field, '')).hexdigest() - self.assertEqual(value[3:], md5_info_value) - else: - self.assertEqual(value, info_dict.get(info_field)) + self.assertEqual(value, info_dict.get(info_field)) finally: for tc in test_cases: _try_rm(tc['file'])