Commit 252ec91d authored by Stefan Behnel's avatar Stefan Behnel

test runner for doctests didn't handle compile errors

parent 331f837b
......@@ -170,20 +170,15 @@ class CythonCompileTestCase(unittest.TestCase):
self.run_distutils(module, workdir, incdir)
class CythonRunTestCase(CythonCompileTestCase):
def runTest(self):
self.run()
def shortDescription(self):
return "compiling and running " + self.module
def run(self, result=None):
if result is None:
result = self.defaultTestResult()
CythonCompileTestCase.runTest(self)
try:
try:
self.runTest()
doctest.DocTestSuite(self.module).run(result)
except ImportError:
result.startTest(self)
result.addFailure(self, sys.exc_info())
result.stopTest(self)
except Exception:
result.startTest(self)
result.addError(self, sys.exc_info())
......
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