diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 958acd36a74..b60fcc73a1b 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -157,14 +157,13 @@ def run(self, test): return result -def run_unittest(testclass): +def run_suite(suite): """Run tests from a unittest.TestCase-derived class.""" if verbose: runner = unittest.TextTestRunner(sys.stdout, verbosity=2) else: runner = BasicTestRunner() - suite = unittest.makeSuite(testclass) result = runner.run(suite) if not result.wasSuccessful(): if len(result.errors) == 1 and not result.failures: @@ -176,6 +175,12 @@ def run_unittest(testclass): % (testclass.__module__, testclass.__name__)) raise TestFailed(err) + +def run_unittest(testclass): + """Run tests from a unittest.TestCase-derived class.""" + run_suite(unittest.makeSuite(testclass)) + + #======================================================================= # doctest driver.