summaryrefslogtreecommitdiff
path: root/numpy/testing/numpytest.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2007-08-30 09:37:20 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2007-08-30 09:37:20 +0000
commit1e2610a2d517987c3d93ae7a0d0931edaf8a3827 (patch)
tree1a913cbbb7cbc8ef47565688ad5524fe41b5a930 /numpy/testing/numpytest.py
parent5ebd53c59a59ec730feccff0341ea47d1959a6e6 (diff)
downloadnumpy-1e2610a2d517987c3d93ae7a0d0931edaf8a3827.tar.gz
Make test() to return TestResult instance.
Diffstat (limited to 'numpy/testing/numpytest.py')
-rw-r--r--numpy/testing/numpytest.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/numpy/testing/numpytest.py b/numpy/testing/numpytest.py
index b859ad477..2c1650215 100644
--- a/numpy/testing/numpytest.py
+++ b/numpy/testing/numpytest.py
@@ -585,11 +585,11 @@ class NumpyTest:
old_displayhook = sys.displayhook
sys.displayhook = sys.__displayhook__
try:
- runner.run(all_tests)
+ r = runner.run(all_tests)
finally:
sys.displayhook = old_displayhook
sys.argv[1:] = old_sys_argv
- return runner
+ return r
def testall(self, level=1,verbosity=1):
""" Run Numpy module test suite with level and verbosity.
@@ -646,10 +646,9 @@ class NumpyTest:
default=r'.*',
type='string')
(options, args) = parser.parse_args()
- self.test(options.level,options.verbosity,
- sys_argv=splitcmdline(options.sys_argv or ''),
- testcase_pattern=options.testcase_pattern)
- return
+ return self.test(options.level,options.verbosity,
+ sys_argv=splitcmdline(options.sys_argv or ''),
+ testcase_pattern=options.testcase_pattern)
def warn(self, message):
from numpy.distutils.misc_util import yellow_text