[pypy-commit] pypy numpy-dtype-alt: 32 bit fixes for the tests.
alex_gaynor
noreply at buildbot.pypy.org
Sat Aug 27 06:46:37 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-dtype-alt
Changeset: r46808:b8865963c702
Date: 2011-08-27 00:52 -0400
http://bitbucket.org/pypy/pypy/changeset/b8865963c702/
Log: 32 bit fixes for the tests.
diff --git a/pypy/module/micronumpy/test/test_dtypes.py b/pypy/module/micronumpy/test/test_dtypes.py
--- a/pypy/module/micronumpy/test/test_dtypes.py
+++ b/pypy/module/micronumpy/test/test_dtypes.py
@@ -45,9 +45,10 @@
def test_copy_array_with_dtype(self):
from numpy import array
a = array([0, 1, 2, 3], dtype=long)
- assert isinstance(a[0], int)
+ # int on 64-bit, long in 32-bit
+ assert isinstance(a[0], (int, long))
b = a.copy()
- assert isinstance(b[0], int)
+ assert isinstance(b[0], (int, long))
a = array([0, 1, 2, 3], dtype=bool)
assert isinstance(a[0], bool)
@@ -70,14 +71,14 @@
from numpy import zeros
a = zeros(10, dtype=long)
for i in range(10):
- assert isinstance(a[i], int)
+ assert isinstance(a[i], (int, long))
assert a[1] == 0
def test_ones_long(self):
from numpy import ones
a = ones(10, dtype=bool)
for i in range(10):
- assert isinstance(a[i], int)
+ assert isinstance(a[i], (int, long))
assert a[1] == 1
def test_add_int8(self):
More information about the pypy-commit
mailing list