Author: Antonio Cuni <[email protected]>
Branch: cpyext-avoid-roundtrip
Changeset: r92764:1fe00f592e00
Date: 2017-10-14 17:23 +0200
http://bitbucket.org/pypy/pypy/changeset/1fe00f592e00/

Log:    fix this test

diff --git a/pypy/module/cpyext/test/test_sequence.py 
b/pypy/module/cpyext/test/test_sequence.py
--- a/pypy/module/cpyext/test/test_sequence.py
+++ b/pypy/module/cpyext/test/test_sequence.py
@@ -6,7 +6,7 @@
     PySequence_Fast, PySequence_Contains, PySequence_Index,
     PySequence_GetItem, PySequence_SetItem, PySequence_DelItem)
 from pypy.module.cpyext.pyobject import get_w_obj_and_decref
-
+from pypy.module.cpyext.state import State
 import pytest
 
 class TestSequence(BaseApiTest):
@@ -108,6 +108,7 @@
             PySequence_Contains(space, space.w_None, space.wrap(2))
 
     def test_setitem(self, space, api):
+        state = space.fromcache(State)
         w_value = space.wrap(42)
 
         l = api.PyList_New(1)
@@ -117,7 +118,7 @@
         with raises_w(space, IndexError):
             PySequence_SetItem(space, l, 3, w_value)
 
-        t = api.PyTuple_New(1)
+        t = state.C.PyTuple_New(1)
         api.PyTuple_SetItem(t, 0, l)
         with raises_w(space, TypeError):
             PySequence_SetItem(space, t, 0, w_value)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to