mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Improvement to fix for issue 9926 to allow TestResult to be reused.
This commit is contained in:
parent
f100dbd600
commit
cca5be2e4c
2 changed files with 7 additions and 1 deletions
|
@ -353,11 +353,16 @@ class Test_TestSuite(unittest.TestCase, TestEquality):
|
|||
unittest.TestSuite.__call__(self, *args, **kw)
|
||||
|
||||
suite = MySuite()
|
||||
result = unittest.TestResult()
|
||||
wrapper = unittest.TestSuite()
|
||||
wrapper.addTest(suite)
|
||||
wrapper(unittest.TestResult())
|
||||
wrapper(result)
|
||||
self.assertTrue(suite.called)
|
||||
|
||||
# reusing results should be permitted even if abominable
|
||||
self.assertFalse(result._testRunEntered)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue