[Numpy-svn] r4024 - trunk/numpy/testing

numpy-svn@scip... numpy-svn@scip...
Thu Aug 30 04:37:34 CDT 2007


Author: pearu
Date: 2007-08-30 04:37:20 -0500 (Thu, 30 Aug 2007)
New Revision: 4024

Modified:
   trunk/numpy/testing/numpytest.py
Log:
Make test() to return TestResult instance.

Modified: trunk/numpy/testing/numpytest.py
===================================================================
--- trunk/numpy/testing/numpytest.py	2007-08-30 07:45:21 UTC (rev 4023)
+++ trunk/numpy/testing/numpytest.py	2007-08-30 09:37:20 UTC (rev 4024)
@@ -585,11 +585,11 @@
         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 @@
                           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



More information about the Numpy-svn mailing list