[pypy-svn] r79005 - pypy/branch/rlist-jit/pypy/module/cpyext/test

arigo at codespeak.net arigo at codespeak.net
Thu Nov 11 17:41:16 CET 2010


Author: arigo
Date: Thu Nov 11 17:41:15 2010
New Revision: 79005

Modified:
   pypy/branch/rlist-jit/pypy/module/cpyext/test/test_tupleobject.py
Log:
A failing test.


Modified: pypy/branch/rlist-jit/pypy/module/cpyext/test/test_tupleobject.py
==============================================================================
--- pypy/branch/rlist-jit/pypy/module/cpyext/test/test_tupleobject.py	(original)
+++ pypy/branch/rlist-jit/pypy/module/cpyext/test/test_tupleobject.py	Thu Nov 11 17:41:15 2010
@@ -27,3 +27,13 @@
         
         api.Py_DecRef(ar[0])
         lltype.free(ar, flavor='raw')
+
+    def test_tuple_setup(self, space, api):
+        ref_tup = api.PyTuple_New(2)
+        ref0 = api.PyInt_FromLong(123)
+        ref1 = api.PyInt_FromLong(456)
+        api.PyTuple_SetItem(ref_tup, 0, ref0)
+        api.PyTuple_SetItem(ref_tup, 1, ref1)
+
+        w_tup = from_ref(space, ref_tup)
+        assert space.is_true(space.eq(w_tup, space.wrap((123, 456))))



More information about the Pypy-commit mailing list