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

numpy-svn@scip... numpy-svn@scip...
Mon Aug 20 11:29:17 CDT 2007


Author: stefan
Date: 2007-08-20 11:29:03 -0500 (Mon, 20 Aug 2007)
New Revision: 3978

Modified:
   trunk/numpy/testing/parametric.py
Log:
Fix parametric tests for Python 2.4.


Modified: trunk/numpy/testing/parametric.py
===================================================================
--- trunk/numpy/testing/parametric.py	2007-08-20 13:46:55 UTC (rev 3977)
+++ trunk/numpy/testing/parametric.py	2007-08-20 16:29:03 UTC (rev 3978)
@@ -162,12 +162,13 @@
         if result is None: result = self.defaultTestResult()
 
         # Independent tests: each gets its own setup/teardown
-        if self._testMethodName.startswith(self._indepParTestPrefix):
-            for t in getattr(self, self._testMethodName)():
+        _testMethodName = getattr(self,"_testMethodName", "runTest")
+        if _testMethodName.startswith(self._indepParTestPrefix):
+            for t in getattr(self,_testMethodName)():
                 self.run_test(t,result)
         # Shared-state test: single setup/teardown for all
-        elif self._testMethodName.startswith(self._shareParTestPrefix):
-            tests = getattr(self, self._testMethodName)()
+        elif _testMethodName.startswith(self._shareParTestPrefix):
+            tests = getattr(self,_testMethodName,'runTest')()
             self.run_tests(tests,result)
         # Normal unittest Test methods
         else:



More information about the Numpy-svn mailing list