summaryrefslogtreecommitdiff
path: root/numpy/testing/numpytest.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2006-05-03 16:02:23 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2006-05-03 16:02:23 +0000
commitaa00fd2c05034316bb78251fbb54fa936030d6d2 (patch)
tree329c4ab7a39be35c74299156ed3a17e364d9830f /numpy/testing/numpytest.py
parent30581a54d96448422cc550143e2b6fb860ef5c45 (diff)
downloadnumpy-aa00fd2c05034316bb78251fbb54fa936030d6d2.tar.gz
Fixed doctest usage 2.4-ism.
Diffstat (limited to 'numpy/testing/numpytest.py')
-rw-r--r--numpy/testing/numpytest.py11
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