Author: Maciej Fijalkowski <[email protected]>
Branch: numpy-multidim
Changeset: r49725:bb1ed602bd16
Date: 2011-11-24 15:07 +0200
http://bitbucket.org/pypy/pypy/changeset/bb1ed602bd16/

Log:    Add two tests. One breaks, but it's not exactly a merge blocker

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
@@ -756,6 +756,7 @@
         assert numpypy.array([[1], [2], [3]]).shape == (3, 1)
         assert len(numpypy.zeros((3, 1, 2))) == 3
         raises(TypeError, len, numpypy.zeros(()))
+        raises(ValueError, numpypy.array, [[1, 2], 3])
 
     def test_getsetitem(self):
         import numpypy
@@ -991,6 +992,11 @@
 
         a = zeros((400, 400), dtype=int)
         assert str(a) == "[[0 0 0 ..., 0 0 0]\n [0 0 0 ..., 0 0 0]\n [0 0 0 
..., 0 0 0]\n ..., \n [0 0 0 ..., 0 0 0]\n [0 0 0 ..., 0 0 0]\n [0 0 0 ..., 0 0 
0]]"
+        a = zeros((2, 2, 2))
+        r = str(a)
+        py.test.skip("this is not exactly right, fix it one day")
+        assert r == '[[[ 0.  0.]\n  [ 0.  0.]]\n\n [[ 0.  0.]\n  [ 0.  0.]]]'
+        
     def test_str_slice(self):
         from numpypy import array, zeros
         a = array(range(5), float)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to