Amaury Forgeot d'Arc committed cb82d91

PyPy uses py.test instead of to run CPython test suite.
Call regrtest.replace_stdout() to avoid UnicodeEncodeError when printing a traceback.

Comments (0)

Files changed (1)


 # refer to 2.4.1/test/'s runtest() for comparison
 import sys
 import unittest
-from test import support
+from test import regrtest, support
 support.verbose = 1
 sys.argv[:] = sys.argv[1:]
     mod = __import__(impname, globals(), locals(), [modname])
     indirect_test = getattr(mod, 'test_main', None)
     if indirect_test is not None:
+        regrtest.replace_stdout()
 except unittest.SkipTest:
     sys.stderr.write("="*26 + "skipped" + "="*26 + "\n")