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