diff options
Diffstat (limited to 'numpy/testing/numpytest.py')
-rw-r--r-- | numpy/testing/numpytest.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/numpy/testing/numpytest.py b/numpy/testing/numpytest.py index 9d8ddeca0..d855577da 100644 --- a/numpy/testing/numpytest.py +++ b/numpy/testing/numpytest.py @@ -182,10 +182,13 @@ class NumpyTestCase (unittest.TestCase): m = imp.load_module(name, file, pathname, description) finally: file.close() - tests = doctest.DocTestFinder().find(m) - runner = doctest.DocTestRunner(verbose=False) - for test in tests: - runner.run(test) + if sys.version[:3]<'2.4': + doctest.testmod(m, verbose=False) + else: + tests = doctest.DocTestFinder().find(m) + runner = doctest.DocTestRunner(verbose=False) + for test in tests: + runner.run(test) return ScipyTestCase = NumpyTestCase |