aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_download.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-11-20 06:34:48 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-11-20 06:34:48 +0100
commit4eb92208a3bf05d0860e1f138380e8b5cae20c14 (patch)
tree84fb36d1443d616fbf10e8bfb2f6cd1b792db0b5 /test/test_download.py
parent71791f414ca93d819b8585882ec1eeb006dbb63b (diff)
downloadyoutube-dl-4eb92208a3bf05d0860e1f138380e8b5cae20c14.zip
youtube-dl-4eb92208a3bf05d0860e1f138380e8b5cae20c14.tar.gz
youtube-dl-4eb92208a3bf05d0860e1f138380e8b5cae20c14.tar.bz2
Adapt test to changed .info.json name
Diffstat (limited to 'test/test_download.py')
-rw-r--r--test/test_download.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_download.py b/test/test_download.py
index 16f2008..fe7f7b8 100644
--- a/test/test_download.py
+++ b/test/test_download.py
@@ -103,7 +103,7 @@ def generator(test_case):
tc_filename = get_tc_filename(tc)
try_rm(tc_filename)
try_rm(tc_filename + '.part')
- try_rm(tc_filename + '.info.json')
+ try_rm(os.path.splitext(tc_filename)[0] + '.info.json')
try_rm_tcs_files()
try:
try_num = 1
@@ -130,11 +130,12 @@ def generator(test_case):
if not test_case.get('params', {}).get('skip_download', False):
self.assertTrue(os.path.exists(tc_filename), msg='Missing file ' + tc_filename)
self.assertTrue(tc_filename in finished_hook_called)
- self.assertTrue(os.path.exists(tc_filename + '.info.json'))
+ info_json_fn = os.path.splitext(tc_filename)[0] + '.info.json'
+ self.assertTrue(os.path.exists(info_json_fn))
if 'md5' in tc:
md5_for_file = _file_md5(tc_filename)
self.assertEqual(md5_for_file, tc['md5'])
- with io.open(tc_filename + '.info.json', encoding='utf-8') as infof:
+ with io.open(info_json_fn, encoding='utf-8') as infof:
info_dict = json.load(infof)
for (info_field, expected) in tc.get('info_dict', {}).items():
if isinstance(expected, compat_str) and expected.startswith('md5:'):