mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-26 02:14:32 +01:00
gentests: allow test-specific FileDownloader params override from tests.json
This commit is contained in:
parent
1ca63e3ae3
commit
d3d3199870
@ -104,7 +104,10 @@ def gentests():
|
|||||||
write('@_skip(' + repr(d['skip']) + ')')
|
write('@_skip(' + repr(d['skip']) + ')')
|
||||||
write('def test_' + name + '(self):')
|
write('def test_' + name + '(self):')
|
||||||
write(' filename = ' + repr(d['file']))
|
write(' filename = ' + repr(d['file']))
|
||||||
write(' fd = FileDownloader(self.parameters)')
|
write(' params = self.parameters')
|
||||||
|
for p in d.get('params', {}):
|
||||||
|
write(' params["' + p + '"] = ' + repr(d['params'][p]))
|
||||||
|
write(' fd = FileDownloader(params)')
|
||||||
write(' fd.add_info_extractor(youtube_dl.InfoExtractors.' + name + 'IE())')
|
write(' fd.add_info_extractor(youtube_dl.InfoExtractors.' + name + 'IE())')
|
||||||
for ien in d.get('addIEs', []):
|
for ien in d.get('addIEs', []):
|
||||||
write(' fd.add_info_extractor(youtube_dl.InfoExtractors.' + ien + 'IE())')
|
write(' fd.add_info_extractor(youtube_dl.InfoExtractors.' + ien + 'IE())')
|
||||||
|
Loading…
Reference in New Issue
Block a user