From ff14fc496401b3318339e108f3db2825622c44c3 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Mon, 17 Mar 2014 14:30:13 +0100 Subject: [PATCH] [test] Rename get_testcases to gettestcases Apparently, newer versions of nosetests are somewhat over-eager in their test discovery. --- test/helper.py | 2 +- test/test_all_urls.py | 4 ++-- test/test_download.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/helper.py b/test/helper.py index b1f421ac5..17de951c5 100644 --- a/test/helper.py +++ b/test/helper.py @@ -71,7 +71,7 @@ def report_warning(self, message): old_report_warning(message) self.report_warning = types.MethodType(report_warning, self) -def get_testcases(): +def gettestcases(): for ie in youtube_dl.extractor.gen_extractors(): t = getattr(ie, '_TEST', None) if t: diff --git a/test/test_all_urls.py b/test/test_all_urls.py index 047e84f19..3ce0b910a 100644 --- a/test/test_all_urls.py +++ b/test/test_all_urls.py @@ -9,7 +9,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from test.helper import get_testcases +from test.helper import gettestcases from youtube_dl.extractor import ( FacebookIE, @@ -105,7 +105,7 @@ def test_facebook_matching(self): def test_no_duplicates(self): ies = gen_extractors() - for tc in get_testcases(): + for tc in gettestcases(): url = tc['url'] for ie in ies: if type(ie).__name__ in ('GenericIE', tc['name'] + 'IE'): diff --git a/test/test_download.py b/test/test_download.py index ca8c82f71..8fccdaf9e 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -8,7 +8,7 @@ from test.helper import ( get_params, - get_testcases, + gettestcases, try_rm, md5, report_warning @@ -51,7 +51,7 @@ def _file_md5(fn): with open(fn, 'rb') as f: return hashlib.md5(f.read()).hexdigest() -defs = get_testcases() +defs = gettestcases() class TestDownload(unittest.TestCase):