]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[test] Rename get_testcases to gettestcases
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 17 Mar 2014 13:30:13 +0000 (14:30 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 17 Mar 2014 13:30:13 +0000 (14:30 +0100)
Apparently, newer versions of nosetests are somewhat over-eager in their test discovery.

test/helper.py
test/test_all_urls.py
test/test_download.py

index b1f421ac58331bad23328502f42a0e1316df853d..17de951c55fce050111e3889b360729ecf3f7021 100644 (file)
@@ -71,7 +71,7 @@ class FakeYDL(YoutubeDL):
             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:
index 047e84f192d977a436c28f8caf599981e4b25b26..3ce0b910a16d8bac978f00388b3c0210961b63dc 100644 (file)
@@ -9,7 +9,7 @@ import unittest
 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 @@ class TestAllURLsMatching(unittest.TestCase):
 
     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'):
index ca8c82f71d614021ed6cdf9894da856453dde380..8fccdaf9e079e23de57856457fbc865be844fecd 100644 (file)
@@ -8,7 +8,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
 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):