Commit 1f2b10af authored by Lisandro Dalcin's avatar Lisandro Dalcin

a few Py3k fixes in runtests.py

parent c89bb013
...@@ -8,7 +8,10 @@ import shutil ...@@ -8,7 +8,10 @@ import shutil
import unittest import unittest
import doctest import doctest
import operator import operator
from StringIO import StringIO try:
from StringIO import StringIO
except ImportError:
from io import StringIO
try: try:
import cPickle as pickle import cPickle as pickle
...@@ -394,7 +397,7 @@ class CythonRunTestCase(CythonCompileTestCase): ...@@ -394,7 +397,7 @@ class CythonRunTestCase(CythonCompileTestCase):
try: try:
partial_result = PartialTestResult(result) partial_result = PartialTestResult(result)
doctest.DocTestSuite(module_name).run(partial_result) doctest.DocTestSuite(module_name).run(partial_result)
except Exception, e: except Exception:
partial_result.addError(module_name, sys.exc_info()) partial_result.addError(module_name, sys.exc_info())
result_code = 1 result_code = 1
pickle.dump(partial_result.data(), output) pickle.dump(partial_result.data(), output)
......
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