[pypy-commit] pypy default: fix/enable this dtype test
bdkearns
noreply at buildbot.pypy.org
Fri Nov 15 07:43:21 CET 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r68130:df81eae287fa
Date: 2013-11-15 01:19 -0500
http://bitbucket.org/pypy/pypy/changeset/df81eae287fa/
Log: fix/enable this dtype test
diff --git a/pypy/module/micronumpy/interp_dtype.py b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -143,7 +143,7 @@
if basic == NPY_UNICODELTR:
size >>= 2
endian = NPY_NATBYTE
- elif size <= 1:
+ elif size // (self.size or 1) <= 1:
endian = NPY_IGNORE
else:
endian = self.byteorder
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
@@ -766,8 +766,8 @@
# strange
assert dtype('string').str == '|S0'
assert dtype('unicode').str == byteorder + 'U0'
- #assert dtype(('string', 7)).str == '|S7'
- #assert dtype(('unicode', 7)).str == '<U7'
+ assert dtype(('string', 7)).str == '|S7'
+ assert dtype(('unicode', 7)).str == '<U7'
def test_intp(self):
from numpypy import dtype
More information about the pypy-commit
mailing list