mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue #11798: fix tests for regrtest -R :
This commit is contained in:
parent
59360aadd3
commit
8913a6c83d
3 changed files with 19 additions and 2 deletions
|
|
@ -16,6 +16,8 @@ def _call_if_exists(parent, attr):
|
|||
class BaseTestSuite(object):
|
||||
"""A simple test suite that doesn't provide class or module shared fixtures.
|
||||
"""
|
||||
_cleanup = True
|
||||
|
||||
def __init__(self, tests=()):
|
||||
self._tests = []
|
||||
self.addTests(tests)
|
||||
|
|
@ -61,7 +63,8 @@ class BaseTestSuite(object):
|
|||
if result.shouldStop:
|
||||
break
|
||||
test(result)
|
||||
self._removeTestAtIndex(index)
|
||||
if self._cleanup:
|
||||
self._removeTestAtIndex(index)
|
||||
return result
|
||||
|
||||
def _removeTestAtIndex(self, index):
|
||||
|
|
@ -115,7 +118,8 @@ class TestSuite(BaseTestSuite):
|
|||
else:
|
||||
test.debug()
|
||||
|
||||
self._removeTestAtIndex(index)
|
||||
if self._cleanup:
|
||||
self._removeTestAtIndex(index)
|
||||
|
||||
if topLevel:
|
||||
self._tearDownPreviousClass(None, result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue