]> granicus.if.org Git - python/commitdiff
Merged revisions 85086 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Sat, 4 Dec 2010 17:24:46 +0000 (17:24 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sat, 4 Dec 2010 17:24:46 +0000 (17:24 +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 deb422903d0bdaf740839c6e919153b914805a68..9f038c4d6a134c0dec22879b302adf517cc90e50 100755 (executable)
@@ -894,16 +894,16 @@ def runtest_inner(test, verbose, quiet,
     except KeyboardInterrupt:
         raise
     except test_support.TestFailed, msg:
-        print "test", test, "failed --", msg
-        sys.stdout.flush()
+        print >>sys.stderr, "test", test, "failed --", msg
+        sys.stderr.flush()
         return FAILED, test_time
     except:
         type, value = sys.exc_info()[:2]
-        print "test", test, "crashed --", str(type) + ":", value
-        sys.stdout.flush()
+        print >>sys.stderr, "test", test, "crashed --", str(type) + ":", value
+        sys.stderr.flush()
         if verbose:
-            traceback.print_exc(file=sys.stdout)
-            sys.stdout.flush()
+            traceback.print_exc(file=sys.stderr)
+            sys.stderr.flush()
         return FAILED, test_time
     else:
         if refleak:
index 4cd8350457079c6ee5282fd52da8160bdff62cb0..24c072c368796c31260f8c7bb443da7b4edc1931 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -791,6 +791,7 @@ Frank J. Tobin
 R Lindsay Todd
 Bennett Todd
 Matias Torchinsky
+Sandro Tosi
 Richard Townsend
 Laurence Tratt
 John Tromp
index 79ee4a2fcdb443183071a84b38956faec2050d20..6ca939a1c9ad0db2d65270e3f0b8bbb17983506f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,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 2.7.1?
 ===========================