X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=test%2Ftest_download.py;h=5c5824d65a7063304253420100dc519f2d90940d;hb=c4d6fc6d659ba74aab3f59aca02ff0e2e0763eb4;hp=01a8bcb89814a5fd450d0d9c1a7959224e37bbcb;hpb=c6c22e984d0d35172d8e39d2136d2059494d22b2;p=youtube-dl diff --git a/test/test_download.py b/test/test_download.py index 01a8bcb89..5c5824d65 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -11,6 +11,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import ( assertGreaterEqual, expect_warnings, + expect_value, get_params, gettestcases, expect_info_dict, @@ -151,7 +152,7 @@ def generator(test_case, tname): try_num = 1 while True: try: - # We're not using .download here sine that is just a shim + # We're not using .download here since that is just a shim # for outside error handling, and returns the exit code # instead of the result dict. res_dict = ydl.extract_info( @@ -199,7 +200,9 @@ def generator(test_case, tname): self.assertEqual( test_case['playlist_duration_sum'], got_duration) - for tc in test_cases: + 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)