Author: mattip
Branch: numppy-flatitter
Changeset: r51684:dd2ec11ec817
Date: 2012-01-23 11:02 +0200
http://bitbucket.org/pypy/pypy/changeset/dd2ec11ec817/

Log:    correct faulty tests

diff --git a/pypy/module/micronumpy/interp_numarray.py 
b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -1304,7 +1304,7 @@
     elif space.isinstance_w(w_item_or_slice, space.w_slice):
         start, stop, step, lngth = 
space.decode_index4(w_item_or_slice,arr.size)
     else:
-        operationerrfmt(space.NotImplementedError,'cannot iterator over %s 
yet', w_item_or_slice)
+        raise operationerrfmt(space.w_NotImplementedError,'cannot iterator 
over %s yet', w_item_or_slice)
     retval = []
     for i in range(start, stop, step):
         coords = []
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
@@ -1317,10 +1317,10 @@
         b = a.T.flat
         b[6::2] = [-1, -2]
         assert (a == [[0, 1, -1, 3], [4, 5, 6, -1], [8, 9, -2, 11]]).all()
-        b[1:2] = [[[100]]]
+        b[0:2] = [[[100]]]
         assert(a[0,0] == 100)
         assert(a[1,0] == 100)
-        b[array([10, 11])] == [-20, -40]
+        raises(NotImplementedError, 'b[array([10, 11])] == [-20, -40]')
         
 
     def test_flatiter_view(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to