Skip to content

Commit f8197c3

Browse files
committed
Merged revisions 79270 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79270 | michael.foord | 2010-03-21 20:56:54 -0500 (Sun, 21 Mar 2010) | 1 line expected failure should not trigger failfast behavior in unittest. ........
1 parent e3a1f6d commit f8197c3

3 files changed

Lines changed: 1 addition & 8 deletions

File tree

Lib/test/test_unittest.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,12 +2125,6 @@ def testFailFast(self):
21252125
result.addUnexpectedSuccess(None)
21262126
self.assertTrue(result.shouldStop)
21272127

2128-
result = unittest.TestResult()
2129-
result._exc_info_to_string = lambda *_: ''
2130-
result.failfast = True
2131-
result.addExpectedFailure(None, None)
2132-
self.assertTrue(result.shouldStop)
2133-
21342128
def testFailFastSetByRunner(self):
21352129
runner = unittest.TextTestRunner(stream=io.StringIO(), failfast=True)
21362130
def test(result):

Lib/unittest/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def runTests(self):
178178
testRunner = self.testRunner(verbosity=self.verbosity,
179179
failfast=self.failfast)
180180
except TypeError:
181-
# didn't accept the verbosity or failfast argument
181+
# didn't accept the verbosity or failfast arguments
182182
testRunner = self.testRunner()
183183
else:
184184
# it is assumed to be a TestRunner instance

Lib/unittest/result.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def addSkip(self, test, reason):
8181
"""Called when a test is skipped."""
8282
self.skipped.append((test, reason))
8383

84-
@failfast
8584
def addExpectedFailure(self, test, err):
8685
"""Called when an expected failure/error occured."""
8786
self.expectedFailures.append(

0 commit comments

Comments
 (0)