Commits

Daniel Roberts committed 7fc96b6

Tested to make sure there was no failure, instead of testing for success, so I didn't catch that I didn't return 0 on success.

Comments (0)

Files changed (2)

pypy/module/cpyext/sequence.py

 
     # FIXME: May be too lenient
     space.delitem(w_o, space.wrap(i))
+    return 0

pypy/module/cpyext/test/test_sequence.py

         w_l = space.wrap([1, 2, 3, 4])
 
         result = api.PySequence_DelItem(w_l, 2)
-        assert result != -1
+        assert result == 0
         assert space.eq_w(w_l, space.wrap([1, 2, 4]))
 
         self.raises(space, api, IndexError, api.PySequence_DelItem,
                     w_l, 3)
-        
+