[pypy-commit] pypy fix-1674: Add more test cases

Vincent Legoll pypy.commits at gmail.com
Tue Dec 29 08:07:09 EST 2015


Author: Vincent Legoll <vincent.legoll at idgrilles.fr>
Branch: fix-1674
Changeset: r81482:df763fde4b86
Date: 2015-12-23 16:07 +0100
http://bitbucket.org/pypy/pypy/changeset/df763fde4b86/

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,8 +3263,12 @@
         assert (data[m] == array([[  0.,   1.,   2.,   3.,   4.],
                                   [ 10.,  11.,  12.,  13.,  14.]])).all()
         assert (data[m, 0] == 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, m, None] == array([[0.], [2.]])).all()
 
     def test_dual_indexing_selecting(self):
         from numpy import arange, array


More information about the pypy-commit mailing list