summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2006-07-31 09:00:40 +0000
committerStefan van der Walt <stefan@sun.ac.za>2006-07-31 09:00:40 +0000
commitb4384f37c835c96f426aaf63896a29fe0f7e7bb3 (patch)
treebed97ea040b98964962d3c649b88a39934fa581a
parent4ad281e43eaa9f8cb71a8cb546409d357b2943f1 (diff)
downloadnumpy-b4384f37c835c96f426aaf63896a29fe0f7e7bb3.tar.gz
Fix test for intp on 64 bit systems.
-rw-r--r--numpy/core/tests/test_regression.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index dd5411010..d5970c966 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -179,7 +179,9 @@ class test_regression(NumpyTestCase):
def check_intp(self,level=rlevel):
"""Ticket #99"""
- self.failUnlessRaises(OverflowError,N.intp,'0xb72a7008',16)
+ i_width = N.int_(0).nbytes*2 - 1
+ N.intp('0x' + 'f'*i_width,16)
+ self.failUnlessRaises(OverflowError,N.intp,'0x' + 'f'*(i_width+1),16)
self.failUnlessRaises(ValueError,N.intp,'0x1',32)
assert_equal(255,N.intp('0xFF',16))
assert_equal(1024,N.intp(1024))