From 252ec91d088a5b4733f6be1fa4351f756f510099 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 28 Apr 2008 11:43:11 +0200 Subject: [PATCH] test runner for doctests didn't handle compile errors --- runtests.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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()) -- 2.26.2