diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-07 00:58:26 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-07 00:58:26 (GMT) |
commit | 37d263521203b6f031e8554b47dbf8ac5c2a5cb2 (patch) | |
tree | 32af95e2de1910ebb08276b2d244326ee0566386 /Lib/test/regrtest.py | |
parent | df41a0fa5d598a520604cdc7736c90cf6e47c36b (diff) | |
download | cpython-37d263521203b6f031e8554b47dbf8ac5c2a5cb2.zip cpython-37d263521203b6f031e8554b47dbf8ac5c2a5cb2.tar.gz cpython-37d263521203b6f031e8554b47dbf8ac5c2a5cb2.tar.bz2 |
Merged revisions 80905 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r80905 | victor.stinner | 2010-05-07 02:57:12 +0200 (ven., 07 mai 2010) | 4 lines
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 5eea1d9..30792c2 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -560,6 +560,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, |