mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Merged revisions 79265-79266 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79265 | michael.foord | 2010-03-21 20:01:34 -0500 (Sun, 21 Mar 2010) | 1 line -f/--failfast command line option for unittest. Issue 8074. Documentation still needed. Plus minor change to test_unittest to allow it to be run with python -m test.unittest ........ r79266 | michael.foord | 2010-03-21 20:02:23 -0500 (Sun, 21 Mar 2010) | 1 line Fix failing test committed by accident. ........
This commit is contained in:
parent
dccc1fcfaf
commit
8769fd8a17
4 changed files with 85 additions and 25 deletions
|
@ -124,10 +124,11 @@ class TextTestRunner(object):
|
|||
resultclass = TextTestResult
|
||||
|
||||
def __init__(self, stream=sys.stderr, descriptions=True, verbosity=1,
|
||||
resultclass=None):
|
||||
failfast=False, resultclass=None):
|
||||
self.stream = _WritelnDecorator(stream)
|
||||
self.descriptions = descriptions
|
||||
self.verbosity = verbosity
|
||||
self.failfast = failfast
|
||||
if resultclass is not None:
|
||||
self.resultclass = resultclass
|
||||
|
||||
|
@ -137,6 +138,7 @@ class TextTestRunner(object):
|
|||
def run(self, test):
|
||||
"Run the given test case or test suite."
|
||||
result = self._makeResult()
|
||||
result.failfast = self.failfast
|
||||
startTime = time.time()
|
||||
startTestRun = getattr(result, 'startTestRun', None)
|
||||
if startTestRun is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue