summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLib/test/regrtest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index e92a3f7..00ea0d6 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -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,