print('Skipping: {0}'.format(test_case['skip']))
return
- params = dict(self.parameters) # Duplicate it locally
- for p in test_case.get('params', {}):
- params[p] = test_case['params'][p]
+ params = self.parameters.copy()
+ params.update(test_case.get('params', {}))
fd = FileDownloader(params)
fd.add_info_extractor(ie())
test_cases = test_case.get('playlist', [test_case])
for tc in test_cases:
_try_rm(tc['file'])
+ _try_rm(tc['file'] + '.part')
_try_rm(tc['file'] + '.info.json')
try:
fd.download([test_case['url']])
for tc in test_cases:
- self.assertTrue(os.path.exists(tc['file']))
+ if not test_case.get('params', {}).get('skip_download', False):
+ self.assertTrue(os.path.exists(tc['file']))
self.assertTrue(os.path.exists(tc['file'] + '.info.json'))
if 'md5' in tc:
md5_for_file = _file_md5(tc['file'])
finally:
for tc in test_cases:
_try_rm(tc['file'])
+ _try_rm(tc['file'] + '.part')
_try_rm(tc['file'] + '.info.json')
return test_template