aboutsummaryrefslogtreecommitdiff
path: root/test/test_download.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-06-27 21:15:16 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-06-27 21:15:16 +0200
commitfc2c063e1eeb47b39899d687da56f0daddcbb027 (patch)
tree2d56910a4ab8d7fbc34828e5b7e0f4d4695a9701 /test/test_download.py
parent20db33e29913c92d67907a939b335c00ebc03940 (diff)
Move testcase generator to helper
Diffstat (limited to 'test/test_download.py')
-rw-r--r--test/test_download.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/test/test_download.py b/test/test_download.py
index 019498f62..db43e9962 100644
--- a/test/test_download.py
+++ b/test/test_download.py
@@ -17,7 +17,6 @@ import youtube_dl.YoutubeDL
import youtube_dl.extractor
from youtube_dl.utils import *
-DEF_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'tests.json')
PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "parameters.json")
RETRIES = 3
@@ -56,17 +55,8 @@ def _file_md5(fn):
with open(fn, 'rb') as f:
return hashlib.md5(f.read()).hexdigest()
-with io.open(DEF_FILE, encoding='utf-8') as deff:
- defs = json.load(deff)
-for ie in youtube_dl.extractor.gen_extractors():
- t = getattr(ie, '_TEST', None)
- if t:
- t['name'] = type(ie).__name__[:-len('IE')]
- defs.append(t)
- for t in getattr(ie, '_TESTS', []):
- t['name'] = type(ie).__name__[:-len('IE')]
- defs.append(t)
-
+from helper import get_testcases
+defs = get_testcases()
with io.open(PARAMETERS_FILE, encoding='utf-8') as pf:
parameters = json.load(pf)