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

numpy-svn at scipy.org numpy-svn at scipy.org
Sat Feb 20 13:13:09 EST 2010


Author: ptvirtan
Date: 2010-02-20 12:13:08 -0600 (Sat, 20 Feb 2010)
New Revision: 8164

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
ENH: core: Fix the test for #99 -- np.long == raw Python long. The test should test np.intp instead

Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2010-02-20 18:12:46 UTC (rev 8163)
+++ trunk/numpy/core/tests/test_regression.py	2010-02-20 18:13:08 UTC (rev 8164)
@@ -139,11 +139,11 @@
     def test_intp(self,level=rlevel):
         """Ticket #99"""
         i_width = np.int_(0).nbytes*2 - 1
-        long('0x' + 'f'*i_width,16)
-        #self.failUnlessRaises(OverflowError,np.intp,'0x' + 'f'*(i_width+1),16)
-        #self.failUnlessRaises(ValueError,np.intp,'0x1',32)
-        assert_equal(255,np.long('0xFF',16))
-        assert_equal(1024,np.long(1024))
+        np.intp('0x' + 'f'*i_width,16)
+        self.failUnlessRaises(OverflowError,np.intp,'0x' + 'f'*(i_width+1),16)
+        self.failUnlessRaises(ValueError,np.intp,'0x1',32)
+        assert_equal(255,np.intp('0xFF',16))
+        assert_equal(1024,np.intp(1024))
 
     def test_endian_bool_indexing(self,level=rlevel):
         """Ticket #105"""




More information about the Numpy-svn mailing list