[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope3-checkins
Subject:    [Zope3-checkins] SVN:
From:       Marius Gedminas <marius () pov ! lt>
Date:       2010-03-25 15:37:09
Message-ID: 20100325153709.5F5FB941B8 () cvs ! zope ! org
[Download RAW message or body]

Log message for revision 110177:
  Make the tests not print anything to stderr.
  
  The regression test, introduced in r88047, still works, which I checked by
  temporarily reintroducing the raise SubprocessError and seeing it fail.
  
  (Incidentally, SubprocessError is never raised anywhere in the current
  codebase.  Instead, output.error_with_banner is called directly.)
  
  

Changed:
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-ntd.txt

-=-
Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-ntd.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-ntd.txt	2010-03-25 \
                14:05:09 UTC (rev 110176)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-ntd.txt	2010-03-25 \
15:37:09 UTC (rev 110177) @@ -244,6 +244,10 @@
 stderrtest does), the output is ignored (but it doesn't cause a SubprocessError
 like it once did).
 
+    >>> from cStringIO import StringIO
+    >>> real_stderr = sys.stderr
+    >>> sys.stderr = StringIO()
+
     >>> sys.argv = [testrunner_script, '-s', 'sample2', '--tests-pattern',
     ...     '(sampletests_ntd$|stderrtest)']
     >>> testrunner.run_internal(defaults)
@@ -258,3 +262,9 @@
       Tear down sample2.stderrtest.Layer in 0.000 seconds.
     Total: 2 tests, 0 failures, 0 errors in 0.197 seconds.
     False
+
+    >>> print sys.stderr.getvalue()
+    A message on stderr.  Please ignore (expected in test output).
+
+    >>> sys.stderr = real_stderr
+

_______________________________________________
Zope3-Checkins mailing list
Zope3-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope3-checkins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic