summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Foord <fuzzyman@voidspace.org.uk>2010-06-10 20:41:54 (GMT)
committerMichael Foord <fuzzyman@voidspace.org.uk>2010-06-10 20:41:54 (GMT)
commit2b293cf1a5dd602025ed01a0a520f005b543c319 (patch)
treeff86a2970310fe9e3ecb81809134e53e62f9e306
parentd8efa020d8591762bd4c1ab7a987eeafff72fdec (diff)
downloadcpython-2b293cf1a5dd602025ed01a0a520f005b543c319.zip
cpython-2b293cf1a5dd602025ed01a0a520f005b543c319.tar.gz
cpython-2b293cf1a5dd602025ed01a0a520f005b543c319.tar.bz2
Merged revisions 81878 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81878 | michael.foord | 2010-06-10 21:40:21 +0100 (Thu, 10 Jun 2010) | 2 lines Fix issue with nested test suites debug method and module setups. (unittest) ........
-rw-r--r--Lib/unittest/suite.py2
-rw-r--r--Lib/unittest/test/test_setups.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/unittest/suite.py b/Lib/unittest/suite.py
index a543e81..b6ae68c 100644
--- a/Lib/unittest/suite.py
+++ b/Lib/unittest/suite.py
@@ -109,7 +109,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 2ea4557..eda3068 100644
--- a/Lib/unittest/test/test_setups.py
+++ b/Lib/unittest/test/test_setups.py
@@ -494,7 +494,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):