[pypy-svn] r25892 - pypy/dist/pypy/rpython/rctypes/test
arigo at codespeak.net
arigo at codespeak.net
Mon Apr 17 15:01:57 CEST 2006
Author: arigo
Date: Mon Apr 17 15:01:56 2006
New Revision: 25892
Modified:
pypy/dist/pypy/rpython/rctypes/test/test_rarray.py
Log:
Reminder: keepalives not implemented for arrays and structs.
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rarray.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rarray.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rarray.py Mon Apr 17 15:01:56 2006
@@ -2,7 +2,7 @@
Test the rctypes implementation.
"""
-import py.test
+import py
import pypy.rpython.rctypes.implementation
from pypy.annotation import model as annmodel
from pypy.annotation.annrpython import RPythonAnnotator
@@ -247,6 +247,22 @@
res = interpret(func, [])
assert res == 121
+ def test_specialize_keepalive(self):
+ py.test.skip("in-progress")
+ class S(Structure):
+ _fields_ = [('x', c_int)]
+ A = POINTER(S) * 10
+ def func():
+ a = A()
+ for i in range(10):
+ s = S()
+ s.x = i*i
+ a[i].contents = s
+ for i in range(10):
+ assert a[i].contents.x == i*i
+ func()
+ interpret(func, [])
+
class Test_compilation:
def test_compile_array_access(self):
def access_array():
More information about the Pypy-commit
mailing list