diff options
Diffstat (limited to 'Lib/unittest/__init__.py')
-rw-r--r-- | Lib/unittest/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/unittest/__init__.py b/Lib/unittest/__init__.py index a5d50af78f2..f6d7ae278ba 100644 --- a/Lib/unittest/__init__.py +++ b/Lib/unittest/__init__.py @@ -67,3 +67,12 @@ from .signals import installHandler, registerResult, removeResult, removeHandler # deprecated _TextTestResult = TextTestResult + +# There are no tests here, so don't try to run anything discovered from +# introspecting the symbols (e.g. FunctionTestCase). Instead, all our +# tests come from within unittest.test. +def load_tests(loader, tests, pattern): + import os.path + # top level directory cached on loader instance + this_dir = os.path.dirname(__file__) + return loader.discover(start_dir=this_dir, pattern=pattern) |