Commit b9923619 authored by Stefan Behnel's avatar Stefan Behnel

Fix output encoding problems in the test runner with Py2.7.

parent c7dc24bc
...@@ -1290,12 +1290,12 @@ class CythonCompileTestCase(unittest.TestCase): ...@@ -1290,12 +1290,12 @@ class CythonCompileTestCase(unittest.TestCase):
try: try:
build_extension.run() build_extension.run()
except CompileError as exc: except CompileError as exc:
error = exc error = str(exc)
stderr = prepare_captured(get_stderr()) stderr = prepare_captured(get_stderr())
if stderr: if stderr:
print("Compiler output for module %s:\n%s" % (module, stderr)) print(u"Compiler output for module %s:\n%s" % (module, stderr))
if error is not None: if error is not None:
raise CompileError("%s\nCompiler output:\n%s" % (error, stderr)) raise CompileError(u"%s\nCompiler output:\n%s" % (error, stderr))
finally: finally:
os.chdir(cwd) os.chdir(cwd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment