From: Stefan Behnel Date: Mon, 28 Apr 2008 09:43:11 +0000 (+0200) Subject: test runner for doctests didn't handle compile errors X-Git-Tag: 0.9.6.14~12^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=252ec91d088a5b4733f6be1fa4351f756f510099;p=cython.git test runner for doctests didn't handle compile errors --- diff --git a/runtests.py b/runtests.py index e0d06278..1f922e12 100644 --- a/runtests.py +++ b/runtests.py @@ -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: - doctest.DocTestSuite(self.module).run(result) - except ImportError: - result.startTest(self) - result.addFailure(self, sys.exc_info()) - result.stopTest(self) + self.runTest() + doctest.DocTestSuite(self.module).run(result) except Exception: result.startTest(self) result.addError(self, sys.exc_info())