X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=test%2Ftest_download.py;h=87aced97cfe6e25750183e2fd94d4c2392703d9b;hb=b703ab4d7f39ea7e9a88c971d55fdcc1b468ba26;hp=608e4528ed55b1bbdc60f922e3d6d50af877ad98;hpb=70b7e3fbb62e9bec12328bb9d506327fe77a85c0;p=youtube-dl.git diff --git a/test/test_download.py b/test/test_download.py index 608e4528e..87aced97c 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -23,10 +23,12 @@ import json import socket import youtube_dl.YoutubeDL -from youtube_dl.utils import ( +from youtube_dl.compat import ( compat_http_client, compat_urllib_error, compat_HTTPError, +) +from youtube_dl.utils import ( DownloadError, ExtractorError, format_bytes, @@ -94,7 +96,7 @@ def generator(test_case): params.setdefault('extract_flat', True) params.setdefault('skip_download', True) - ydl = YoutubeDL(params) + ydl = YoutubeDL(params, auto_init=False) ydl.add_default_info_extractors() finished_hook_called = set() def _hook(status): @@ -185,7 +187,9 @@ def generator(test_case): md5_for_file = _file_md5(tc_filename) self.assertEqual(md5_for_file, tc['md5']) info_json_fn = os.path.splitext(tc_filename)[0] + '.info.json' - self.assertTrue(os.path.exists(info_json_fn)) + self.assertTrue( + os.path.exists(info_json_fn), + 'Missing info file %s' % info_json_fn) with io.open(info_json_fn, encoding='utf-8') as infof: info_dict = json.load(infof)