summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-05-19 20:30:19 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-05-19 20:30:19 (GMT)
commitdb19fb6bb18b350cdca7449423a4e51500412f47 (patch)
tree2e87a6116fa4fe73addc365db1ac79e4e09b4734 /Lib/test/regrtest.py
parent20c043b40cf6da38ca90897827f80c8811dcade4 (diff)
downloadcpython-db19fb6bb18b350cdca7449423a4e51500412f47.zip
cpython-db19fb6bb18b350cdca7449423a4e51500412f47.tar.gz
cpython-db19fb6bb18b350cdca7449423a4e51500412f47.tar.bz2
Merged revisions 81359-81361 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81359 | victor.stinner | 2010-05-19 19:00:07 +0200 (mer., 19 mai 2010) | 4 lines Issue #8663: distutils.log emulates backslashreplace error handler. Fix compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if stdout is not a TTY). ........ r81360 | victor.stinner | 2010-05-19 19:11:19 +0200 (mer., 19 mai 2010) | 5 lines regrtest.py: call replace_stdout() before the first call to print() print("== ", os.getcwd()) fails if the current working directory is not ASCII whereas sys.stdout encoding is ASCII. ........ r81361 | victor.stinner | 2010-05-19 19:15:50 +0200 (mer., 19 mai 2010) | 2 lines Oops, add the new test_log.py for distutils test suite (missing part of r81359) ........
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 30792c2..c2c44e5 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -215,6 +215,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
on the command line.
"""
+ replace_stdout()
+
support.record_original_stdout(sys.stdout)
try:
opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsSrf:lu:t:TD:NLR:wM:n',
@@ -411,7 +413,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
support.verbose = verbose # Tell tests to be moderately quiet
support.use_resources = use_resources
save_modules = sys.modules.keys()
- replace_stdout()
for test in tests:
if not quiet:
print(test)