diff --git a/Lib/unittest/suite.py b/Lib/unittest/suite.py index 04d35b883b3..8602107eb8b 100644 --- a/Lib/unittest/suite.py +++ b/Lib/unittest/suite.py @@ -112,7 +112,7 @@ class TestSuite(BaseTestSuite): continue if hasattr(test, '_wrapped_run'): - test._wrapped_run(result) + test._wrapped_run(result, debug) elif not debug: test(result) else: diff --git a/Lib/unittest/test/test_setups.py b/Lib/unittest/test/test_setups.py index a9e1ae98b4e..9456819ea16 100644 --- a/Lib/unittest/test/test_setups.py +++ b/Lib/unittest/test/test_setups.py @@ -495,7 +495,9 @@ class TestSetups(unittest.TestCase): Test.__module__ = 'Module' sys.modules['Module'] = Module - suite = unittest.defaultTestLoader.loadTestsFromTestCase(Test) + _suite = unittest.defaultTestLoader.loadTestsFromTestCase(Test) + suite = unittest.TestSuite() + suite.addTest(_suite) messages = ('setUpModule', 'tearDownModule', 'setUpClass', 'tearDownClass', 'test_something') for phase, msg in enumerate(messages):