Kaydet (Commit) f8197c34 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

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.
........
üst e3a1f6d3
......@@ -2125,12 +2125,6 @@ class Test_TestResult(TestCase):
result.addUnexpectedSuccess(None)
self.assertTrue(result.shouldStop)
result = unittest.TestResult()
result._exc_info_to_string = lambda *_: ''
result.failfast = True
result.addExpectedFailure(None, None)
self.assertTrue(result.shouldStop)
def testFailFastSetByRunner(self):
runner = unittest.TextTestRunner(stream=io.StringIO(), failfast=True)
def test(result):
......
......@@ -178,7 +178,7 @@ class TestProgram(object):
testRunner = self.testRunner(verbosity=self.verbosity,
failfast=self.failfast)
except TypeError:
# didn't accept the verbosity or failfast argument
# didn't accept the verbosity or failfast arguments
testRunner = self.testRunner()
else:
# it is assumed to be a TestRunner instance
......
......@@ -81,7 +81,6 @@ class TestResult(object):
"""Called when a test is skipped."""
self.skipped.append((test, reason))
@failfast
def addExpectedFailure(self, test, err):
"""Called when an expected failure/error occured."""
self.expectedFailures.append(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment