[Python-checkins] r79273 - in python/branches/py3k: Lib/test/test_unittest.py Lib/unittest/main.py Lib/unittest/result.py

benjamin.peterson python-checkins at python.org
Mon Mar 22 03:02:37 CET 2010


Author: benjamin.peterson
Date: Mon Mar 22 03:02:37 2010
New Revision: 79273

Log:
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.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/test/test_unittest.py
   python/branches/py3k/Lib/unittest/main.py
   python/branches/py3k/Lib/unittest/result.py

Modified: python/branches/py3k/Lib/test/test_unittest.py
==============================================================================
--- python/branches/py3k/Lib/test/test_unittest.py	(original)
+++ python/branches/py3k/Lib/test/test_unittest.py	Mon Mar 22 03:02:37 2010
@@ -2125,12 +2125,6 @@
         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):

Modified: python/branches/py3k/Lib/unittest/main.py
==============================================================================
--- python/branches/py3k/Lib/unittest/main.py	(original)
+++ python/branches/py3k/Lib/unittest/main.py	Mon Mar 22 03:02:37 2010
@@ -178,7 +178,7 @@
                 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

Modified: python/branches/py3k/Lib/unittest/result.py
==============================================================================
--- python/branches/py3k/Lib/unittest/result.py	(original)
+++ python/branches/py3k/Lib/unittest/result.py	Mon Mar 22 03:02:37 2010
@@ -81,7 +81,6 @@
         """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(


More information about the Python-checkins mailing list