]> granicus.if.org Git - python/commitdiff
regrtest.py: disable replace_stdout() on Windows until it is fixed
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 7 May 2010 00:57:12 +0000 (00:57 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 7 May 2010 00:57:12 +0000 (00:57 +0000)
See issue #8533 (problem with newlines on Windows).

Lib/test/regrtest.py

index e92a3f700aac1b272a157001a69b706698b766fb..00ea0d62b18abafe77651b13f312adbf9616551e 100755 (executable)
@@ -733,6 +733,9 @@ def findtests(testdir=None, stdtests=STDTESTS, nottests=NOTTESTS):
 def replace_stdout():
     """Set stdout encoder error handler to backslashreplace (as stderr error
     handler) to avoid UnicodeEncodeError when printing a traceback"""
+    if os.name == "nt":
+        # Replace sys.stdout breaks the stdout newlines on Windows: issue #8533
+        return
     stdout = sys.stdout
     sys.stdout = open(stdout.fileno(), 'w',
         encoding=stdout.encoding,