Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r59408:cb82d91ddbdf
Date: 2012-12-11 22:45 +0100
http://bitbucket.org/pypy/pypy/changeset/cb82d91ddbdf/

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

diff --git a/pypy/tool/pytest/run-script/regrverbose.py 
b/pypy/tool/pytest/run-script/regrverbose.py
--- a/pypy/tool/pytest/run-script/regrverbose.py
+++ b/pypy/tool/pytest/run-script/regrverbose.py
@@ -1,7 +1,7 @@
 # refer to 2.4.1/test/regrtest.py'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:]
 
@@ -11,6 +11,7 @@
     mod = __import__(impname, globals(), locals(), [modname])
     indirect_test = getattr(mod, 'test_main', None)
     if indirect_test is not None:
+        regrtest.replace_stdout()
         indirect_test()
 except unittest.SkipTest:
     sys.stderr.write("="*26 + "skipped" + "="*26 + "\n")
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to