Commit d0b9ed0e authored by Stefan Behnel's avatar Stefan Behnel

simplify evaluation of --cython-only option in test runner

parent 687d8404
...@@ -746,6 +746,7 @@ class CythonRunTestCase(CythonCompileTestCase): ...@@ -746,6 +746,7 @@ class CythonRunTestCase(CythonCompileTestCase):
self.success = False self.success = False
self.runCompileTest() self.runCompileTest()
failures, errors = len(result.failures), len(result.errors) failures, errors = len(result.failures), len(result.errors)
if not self.cython_only:
self.run_tests(result) self.run_tests(result)
if failures == len(result.failures) and errors == len(result.errors): if failures == len(result.failures) and errors == len(result.errors):
# No new errors... # No new errors...
...@@ -761,7 +762,6 @@ class CythonRunTestCase(CythonCompileTestCase): ...@@ -761,7 +762,6 @@ class CythonRunTestCase(CythonCompileTestCase):
pass pass
def run_tests(self, result): def run_tests(self, result):
if not self.cython_only:
self.run_doctests(self.module, result) self.run_doctests(self.module, result)
def run_doctests(self, module_name, result): def run_doctests(self, module_name, result):
...@@ -926,7 +926,6 @@ class CythonUnitTestCase(CythonRunTestCase): ...@@ -926,7 +926,6 @@ class CythonUnitTestCase(CythonRunTestCase):
return "compiling (%s) tests in %s" % (self.language, self.module) return "compiling (%s) tests in %s" % (self.language, self.module)
def run_tests(self, result): def run_tests(self, result):
if not self.cython_only:
unittest.defaultTestLoader.loadTestsFromName(self.module).run(result) unittest.defaultTestLoader.loadTestsFromName(self.module).run(result)
...@@ -960,8 +959,6 @@ class CythonPyregrTestCase(CythonRunTestCase): ...@@ -960,8 +959,6 @@ class CythonPyregrTestCase(CythonRunTestCase):
self.run_doctests(module, result) self.run_doctests(module, result)
def run_tests(self, result): def run_tests(self, result):
if self.cython_only:
return
try: try:
from test import support from test import support
except ImportError: # Python2.x except ImportError: # Python2.x
......
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