[Numpy-svn] r5041 - trunk/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Thu Apr 17 15:23:31 CDT 2008


Author: rkern
Date: 2008-04-17 15:23:30 -0500 (Thu, 17 Apr 2008)
New Revision: 5041

Modified:
   trunk/numpy/core/tests/test_multiarray.py
Log:
De-obfuscate some test code.

Modified: trunk/numpy/core/tests/test_multiarray.py
===================================================================
--- trunk/numpy/core/tests/test_multiarray.py	2008-04-17 20:16:11 UTC (rev 5040)
+++ trunk/numpy/core/tests/test_multiarray.py	2008-04-17 20:23:30 UTC (rev 5041)
@@ -219,31 +219,31 @@
 
 class TestScalarIndexing(NumpyTestCase):
     def setUp(self):
-        self.d = array([0,1])[0], 
+        self.d = array([0,1])[0]
 
     def check_ellipsis_subscript(self):
-        a, = self.d
+        a = self.d
         self.failUnlessEqual(a[...], 0)
         self.failUnlessEqual(a[...].shape,())
 
     def check_empty_subscript(self):
-        a, = self.d
+        a = self.d
         self.failUnlessEqual(a[()], 0)
         self.failUnlessEqual(a[()].shape,())
 
     def check_invalid_subscript(self):
-        a, = self.d
+        a = self.d
         self.failUnlessRaises(IndexError, lambda x: x[0], a)
         self.failUnlessRaises(IndexError, lambda x: x[array([], int)], a)
 
     def check_invalid_subscript_assignment(self):
-        a, = self.d
+        a = self.d
         def assign(x, i, v):
             x[i] = v
         self.failUnlessRaises(TypeError, assign, a, 0, 42)
 
     def check_newaxis(self):
-        a, = self.d
+        a = self.d
         self.failUnlessEqual(a[newaxis].shape, (1,))
         self.failUnlessEqual(a[..., newaxis].shape, (1,))
         self.failUnlessEqual(a[newaxis, ...].shape, (1,))
@@ -254,7 +254,7 @@
         self.failUnlessEqual(a[(newaxis,)*10].shape, (1,)*10)
 
     def check_invalid_newaxis(self):
-        a, = self.d
+        a = self.d
         def subscript(x, i): x[i]
         self.failUnlessRaises(IndexError, subscript, a, (newaxis, 0))
         self.failUnlessRaises(IndexError, subscript, a, (newaxis,)*50)



More information about the Numpy-svn mailing list