[Python-checkins] r81360 - python/branches/py3k/Lib/test/regrtest.py

victor.stinner python-checkins at python.org
Wed May 19 19:11:19 CEST 2010


Author: victor.stinner
Date: Wed May 19 19:11:19 2010
New Revision: 81360
Log:
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.
Modified:
 python/branches/py3k/Lib/test/regrtest.py
Modified: python/branches/py3k/Lib/test/regrtest.py
==============================================================================
--- python/branches/py3k/Lib/test/regrtest.py	(original)
+++ python/branches/py3k/Lib/test/regrtest.py	Wed May 19 19:11:19 2010
@@ -258,6 +258,8 @@
 on the command line.
 """
 
+ replace_stdout()
+
 support.record_original_stdout(sys.stdout)
 try:
 opts, args = getopt.getopt(sys.argv[1:], 'hvqxsSrf:lu:t:TD:NLR:FwWM:nj:',
@@ -376,7 +378,6 @@
 elif o in ('-j', '--multiprocess'):
 use_mp = int(a)
 elif o == '--slaveargs':
- replace_stdout()
 args, kwargs = json.loads(a)
 try:
 result = runtest(*args, **kwargs)
@@ -515,8 +516,6 @@
 else:
 tests = iter(selected)
 
- replace_stdout()
-
 if use_mp:
 try:
 from threading import Thread


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /