Author: Maciej Fijalkowski <fij...@gmail.com>
Branch: 
Changeset: r49945:0f011382b9bc
Date: 2011-11-29 10:43 +0200
http://bitbucket.org/pypy/pypy/changeset/0f011382b9bc/

Log:    fix the test

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
@@ -718,8 +718,8 @@
 
     def descr_setitem(self, space, w_idx, w_value):
         self.invalidated()
-        concrete = self.get_concrete()
         if self._single_item_result(space, w_idx):
+            concrete = self.get_concrete()
             if len(concrete.shape) < 1:
                 raise OperationError(space.w_IndexError, space.wrap(
                         "0-d arrays can't be indexed"))
diff --git a/pypy/module/micronumpy/test/test_zjit.py 
b/pypy/module/micronumpy/test/test_zjit.py
--- a/pypy/module/micronumpy/test/test_zjit.py
+++ b/pypy/module/micronumpy/test/test_zjit.py
@@ -328,10 +328,10 @@
     def test_setslice(self):
         result = self.run("setslice")
         assert result == 11.0
-        py.test.skip("generates 2 loops ATM, investigate")
+        self.check_loop_count(1)
         self.check_simple_loop({'getarrayitem_raw': 2, 'float_add' : 1,
-                                'setarrayitem_raw': 1, 'int_add': 2,
-                                'int_lt': 1, 'guard_true': 1, 'jump': 1})
+                                'setarrayitem_raw': 1, 'int_add': 3,
+                                'int_eq': 1, 'guard_false': 1, 'jump': 1})
 
 class TestNumpyOld(LLJitMixin):
     def setup_class(cls):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to