test runner for doctests didn't handle compile errors
authorStefan Behnel <scoder@users.berlios.de>
Mon, 28 Apr 2008 09:43:11 +0000 (11:43 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 28 Apr 2008 09:43:11 +0000 (11:43 +0200)
runtests.py

index e0d062785af264d97cd2b42f0627534a8fa218aa..1f922e12e359c6f10c37992e4b2834efd66450f6 100644 (file)
@@ -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())