From 059006292523264f4e7c7e03df3729612af8099c Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Wed, 7 Jan 2015 07:20:20 +0100 Subject: Respect age_limit when listing extractors (Fixes #4653) --- test/helper.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'test/helper.py') diff --git a/test/helper.py b/test/helper.py index 96d58b7c1..77225e4f7 100644 --- a/test/helper.py +++ b/test/helper.py @@ -82,18 +82,8 @@ class FakeYDL(YoutubeDL): def gettestcases(include_onlymatching=False): for ie in youtube_dl.extractor.gen_extractors(): - t = getattr(ie, '_TEST', None) - if t: - assert not hasattr(ie, '_TESTS'), \ - '%s has _TEST and _TESTS' % type(ie).__name__ - tests = [t] - else: - tests = getattr(ie, '_TESTS', []) - for t in tests: - if not include_onlymatching and t.get('only_matching', False): - continue - t['name'] = type(ie).__name__[:-len('IE')] - yield t + for tc in ie.get_testcases(include_onlymatching): + yield tc md5 = lambda s: hashlib.md5(s.encode('utf-8')).hexdigest() -- cgit v1.2.3