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

numpy-svn@scip... numpy-svn@scip...
Mon Aug 20 11:42:30 CDT 2007


Author: stefan
Date: 2007-08-20 11:42:16 -0500 (Mon, 20 Aug 2007)
New Revision: 3979

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


Modified: trunk/numpy/testing/parametric.py
===================================================================
--- trunk/numpy/testing/parametric.py	2007-08-20 16:29:03 UTC (rev 3978)
+++ trunk/numpy/testing/parametric.py	2007-08-20 16:42:16 UTC (rev 3979)
@@ -161,8 +161,12 @@
 
         if result is None: result = self.defaultTestResult()
 
+        try:
+            _testMethodName = getattr(self,"_testMethodName")
+        except:
+            _testMethodName = getattr(self,"_TestCase__testMethodName")
+
         # Independent tests: each gets its own setup/teardown
-        _testMethodName = getattr(self,"_testMethodName", "runTest")
         if _testMethodName.startswith(self._indepParTestPrefix):
             for t in getattr(self,_testMethodName)():
                 self.run_test(t,result)



More information about the Numpy-svn mailing list