Permalink
Browse files

TST All tests now pass on numpy 1.7.0...

...with python 2.7 and 3.2 on ubuntu 12.04
  • Loading branch information...
1 parent 67cc43b commit 58e54d0fe902769fad68c48bedcd1e954d72918f @kwgoodman committed Mar 19, 2013
Showing with 14 additions and 8 deletions.
  1. +2 −2 README.rst
  2. +6 −3 la/tests/deflarry_creation_test.py
  3. +6 −3 la/tests/deflarry_nose_test.py
View
@@ -122,9 +122,9 @@ After you have installed ``la``, run the suite of unit tests::
>>> import la
>>> la.test()
<snip>
- Ran 2996 tests in 9.225s
+ Ran 2994 tests in 9.225s
OK
- <nose.result.TextTestResult run=2996 errors=0 failures=0>
+ <nose.result.TextTestResult run=2994 errors=0 failures=0>
The ``la`` package contains C extensions that speed up common alignment
operations such as adding two unaligned larrys. If the C extensions don't
@@ -56,9 +56,12 @@ def test_dtype():
lar1 = larry(list(data), dtype=dtype) # larry does dtype
lar2 = larry(np.array(list(data), dtype=dtype)) # array does dtype
yield ale, lar1, lar2, msg % (dtype, 'list')
- lar1 = larry(np.array(list(data)), dtype=dtype) # larry does dtype
- lar2 = larry(np.array(list(data), dtype=dtype)) # array does dtype
- yield ale, lar1, lar2, msg % (dtype, 'array')
+ if dtype != str:
+ # Bug in numpy 1.7.0 makes the following block fail on dtype=str
+ # See https://github.com/numpy/numpy/issues/3159
+ lar1 = larry(np.array(list(data)), dtype=dtype) # larry does dtype
+ lar2 = larry(np.array(list(data), dtype=dtype)) # array does dtype
+ yield ale, lar1, lar2, msg % (dtype, 'array')
# --------------------------------------------------------------------------
@@ -512,9 +512,12 @@ def test_astype_dtype():
data = [0, 1, 2]
msg = 'larry.astype failed on dtype %s'
for dtype in dtypes:
- lar1 = larry(list(data), dtype=dtype) # larry does dtype
- lar2 = larry(list(data)).astype(dtype) # astype does dtype
- yield ale, lar1, lar2, msg % dtype
+ if dtype != str:
+ # Bug in numpy 1.7.0 makes the following block fail on dtype=str
+ # See https://github.com/numpy/numpy/issues/3159
+ lar1 = larry(list(data), dtype=dtype) # larry does dtype
+ lar2 = larry(list(data)).astype(dtype) # astype does dtype
+ yield ale, lar1, lar2, msg % dtype
# --------------------------------------------------------------------------

0 comments on commit 58e54d0

Please sign in to comment.