]> granicus.if.org Git - python/commitdiff
Merged revisions 85086 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Sat, 4 Dec 2010 17:15:21 +0000 (17:15 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sat, 4 Dec 2010 17:15:21 +0000 (17:15 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85086 | r.david.murray | 2010-09-28 21:08:05 -0400 (Tue, 28 Sep 2010) | 4 lines

  #7110: have regrtest print test failures and tracebacks to stderr not stdout.

  Patch by Sandro Tosi.
........

Lib/test/regrtest.py
Misc/ACKS
Misc/NEWS

index 5b1f4e22c88b13e1fdbe8209966e7e24145623ea..5ee09d01619dff0ecb76119ef780ba90e3da8f1a 100755 (executable)
@@ -659,16 +659,16 @@ def runtest_inner(test, generate, verbose, quiet, test_times,
     except KeyboardInterrupt:
         raise
     except support.TestFailed as msg:
-        print("test", test, "failed --", msg)
-        sys.stdout.flush()
+        print("test", test, "failed --", msg, file=sys.stderr)
+        sys.stderr.flush()
         return 0
     except:
         type, value = sys.exc_info()[:2]
-        print("test", test, "crashed --", str(type) + ":", value)
-        sys.stdout.flush()
+        print("test", test, "crashed --", str(type) + ":", value, file=sys.stderr)
+        sys.stderr.flush()
         if verbose or debug:
-            traceback.print_exc(file=sys.stdout)
-            sys.stdout.flush()
+            traceback.print_exc(file=sys.stderr)
+            sys.stderr.flush()
         return 0
     else:
         if refleak:
index 160693461f3e3752b9c36a368702ed73949336e7..1108f9020e4fc06dac6d85c7268f993d7775b040 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -784,6 +784,7 @@ Christian Tismer
 Frank J. Tobin
 R Lindsay Todd
 Bennett Todd
+Sandro Tosi
 Richard Townsend
 Laurence Tratt
 John Tromp
index 76ccf7ab0dcaa54b57c5f687fb6c006b9d4e5e3c..fc3b9a0391cebc8fc31621b8097f456b2055c216 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -27,6 +27,12 @@ Library
 
 - Issue #10464: netrc now correctly handles lines with embedded '#' characters.
 
+Tests
+-----
+
+- Issue #7110: regrtest now sends test failure reports and single-failure
+  tracebacks to stderr rather than stdout.
+
 
 What's New in Python 3.1.3?
 ===========================