summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-02-20 18:13:08 +0000
committerPauli Virtanen <pav@iki.fi>2010-02-20 18:13:08 +0000
commit1ddd3c43fd9bbe2f893575e23ecc86f09a36ae81 (patch)
treec28a651a9c6f07415a358a6910ed54194fab9a4c
parentc0815c57512859e7e05c6b97d05350c2c2f68e81 (diff)
downloadnumpy-1ddd3c43fd9bbe2f893575e23ecc86f09a36ae81.tar.gz
ENH: core: Fix the test for #99 -- np.long == raw Python long. The test should test np.intp instead
-rw-r--r--numpy/core/tests/test_regression.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index f93784c52..13aeae053 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -139,11 +139,11 @@ class TestRegression(TestCase):
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"""