[pypy-commit] pypy numpypy-reshape: add (still not enough) failing tests

mattip noreply at buildbot.pypy.org
Wed Jan 18 21:57:43 CET 2012


Author: mattip
Branch: numpypy-reshape
Changeset: r51463:95362a60e6b8
Date: 2012-01-18 22:57 +0200
http://bitbucket.org/pypy/pypy/changeset/95362a60e6b8/

Log:	add (still not enough) failing tests

diff --git a/pypy/module/micronumpy/test/test_numarray.py b/pypy/module/micronumpy/test/test_numarray.py
--- a/pypy/module/micronumpy/test/test_numarray.py
+++ b/pypy/module/micronumpy/test/test_numarray.py
@@ -396,6 +396,11 @@
         assert (a == [1000, 1, 2, 3, 1000, 5, 6, 7, 1000, 9, 10, 11]).all()
         a = zeros((4, 2, 3))
         a.shape = (12, 2)
+        assert array(1).reshape((1, 1, 1, 1)).shape == (1, 1, 1, 1)
+        assert array([2, 2, 2]).reshape((1, 1, 1, -1)).shape == (1, 1, 1, 3)
+        a=numpypy.array(1)
+        a.shape = (1, 1, 1)
+        assert a.shape == (1, 1, 1)
 
     def test_slice_reshape(self):
         from _numpypy import zeros, arange


More information about the pypy-commit mailing list