[Checkins] SVN: zope.testrunner/trunk/src/zope/testrunner/find.py Fix tests on Python 2.6.

Marius Gedminas cvs-admin at zope.org
Fri Feb 8 07:06:34 UTC 2013


Log message for revision 129204:
  Fix tests on Python 2.6.
  
  When I started writing this test, I intended to use TextTestResult, printing
  to (doctest-captured) stdout.  Then I changed my mind but didn't change the
  code.  The code worked on Python 2.7, but not on 2.6, and I didn't notice
  because I was using detox, which didn't notice because setup.py test failed to
  set the exit code properly.
  
  

Changed:
  U   zope.testrunner/trunk/src/zope/testrunner/find.py

-=-
Modified: zope.testrunner/trunk/src/zope/testrunner/find.py
===================================================================
--- zope.testrunner/trunk/src/zope/testrunner/find.py	2013-02-08 07:00:28 UTC (rev 129203)
+++ zope.testrunner/trunk/src/zope/testrunner/find.py	2013-02-08 07:06:33 UTC (rev 129204)
@@ -48,7 +48,7 @@
     by a regular unittest TestRunner, and it's not hard to make sure
     StartUpFailure does something sensible in that case
 
-    >>> r = unittest.TestResult(sys.stdout)
+    >>> r = unittest.TestResult()
     >>> s.run(r)
     >>> print r.failures[0][1], # doctest: +ELLIPSIS
     Traceback (most recent call last):
@@ -65,7 +65,7 @@
 
     >>> s = StartUpFailure(options, 'fauxmodule', exc_info)
 
-    >>> r = unittest.TestResult(sys.stdout)
+    >>> r = unittest.TestResult()
     >>> s.run(r)
     >>> print r.errors[0][0].shortDescription()
     StartUpFailure: import errors in fauxmodule.



More information about the checkins mailing list