diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-07 00:57:12 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-07 00:57:12 (GMT) |
commit | a3032807f948bcba079bf849e25fb3b79e522500 (patch) | |
tree | 2aee6fae9db811edc5e6b72d8cb5e720d4ed62ae /Lib/test/regrtest.py | |
parent | 208d28cd41ad5cb4bd8665923d486d96232d9a42 (diff) | |
download | cpython-a3032807f948bcba079bf849e25fb3b79e522500.zip cpython-a3032807f948bcba079bf849e25fb3b79e522500.tar.gz cpython-a3032807f948bcba079bf849e25fb3b79e522500.tar.bz2 |
regrtest.py: disable replace_stdout() on Windows until it is fixed
See issue #8533 (problem with newlines on Windows).
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 3 |
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, |