[pypy-commit] pypy fix-1674: Add more test cases
Vincent Legoll
pypy.commits at gmail.com
Tue Dec 29 08:07:12 EST 2015
Author: Vincent Legoll <vincent.legoll at idgrilles.fr>
Branch: fix-1674
Changeset: r81484:63607714b6bf
Date: 2015-12-23 17:55 +0100
http://bitbucket.org/pypy/pypy/changeset/63607714b6bf/
Log: Add more test cases
diff --git a/pypy/module/micronumpy/test/test_ndarray.py b/pypy/module/micronumpy/test/test_ndarray.py
--- a/pypy/module/micronumpy/test/test_ndarray.py
+++ b/pypy/module/micronumpy/test/test_ndarray.py
@@ -3263,11 +3263,13 @@
assert (data[m] == array([[ 0., 1., 2., 3., 4.],
[ 10., 11., 12., 13., 14.]])).all()
assert (data[m, 0] == array([ 0., 10.])).all()
+ # More of the same type of cases
assert (data[m, 0:1] == array([[0.], [10.]])).all()
- assert (data[m, 0:1] == array([[0.], [10.]])).all()
+ assert (data[m, 0:1, ...] == array([[0.], [10.]])).all()
assert (data[..., m, 0:1] == array([[0.], [10.]])).all()
# Assume False for missing elements of the bool index array
assert (data[0, m] == array([ 0., 2.])).all()
+ assert (data[0:1, m] == array([[ 0., 2.]])).all()
assert (data[0, m, None] == array([[0.], [2.]])).all()
def test_dual_indexing_selecting(self):
More information about the pypy-commit
mailing list