aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo.valsorda@gmail.com>2012-12-11 12:09:22 +0100
committerFilippo Valsorda <filippo.valsorda@gmail.com>2012-12-11 12:09:22 +0100
commitd3d31998705fd8d850d07d69933c9ed07257e95f (patch)
treeb73ad50d8ecee157d27c032e32ec402a12ffc330
parent1ca63e3ae3f7f61a9c38e04eec421faa42a1faee (diff)
gentests: allow test-specific FileDownloader params override from tests.json
-rwxr-xr-xtest/gentests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/gentests.py b/test/gentests.py
index a20b139f5..ee9092f33 100755
--- a/test/gentests.py
+++ b/test/gentests.py
@@ -104,7 +104,10 @@ def gentests():
write('@_skip(' + repr(d['skip']) + ')')
write('def test_' + name + '(self):')
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())')
for ien in d.get('addIEs', []):
write(' fd.add_info_extractor(youtube_dl.InfoExtractors.' + ien + 'IE())')