From f8197c3489ff7a12259d9eac6d284514f113c0fe Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 22 Mar 2010 02:02:37 +0000 Subject: 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. ........ --- Lib/test/test_unittest.py | 6 ------ Lib/unittest/main.py | 2 +- Lib/unittest/result.py | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Lib/test/test_unittest.py b/Lib/test/test_unittest.py index a88d75b..d291d90 100644 --- a/Lib/test/test_unittest.py +++ b/Lib/test/test_unittest.py @@ -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): diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py index 1db7978..f2f1044 100644 --- a/Lib/unittest/main.py +++ b/Lib/unittest/main.py @@ -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 diff --git a/Lib/unittest/result.py b/Lib/unittest/result.py index 96d56a1..ec80e8e 100644 --- a/Lib/unittest/result.py +++ b/Lib/unittest/result.py @@ -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( -- cgit v0.12