[pypy-svn] r51540 - pypy/dist/pypy/lib/app_test/ctypes

pedronis at codespeak.net pedronis at codespeak.net
Fri Feb 15 15:34:59 CET 2008


Author: pedronis
Date: Fri Feb 15 15:34:57 2008
New Revision: 51540

Modified:
   pypy/dist/pypy/lib/app_test/ctypes/test_keepalive.py
Log:
skipped exploding tests about ._objects and keepalive logic for nested complex objects



Modified: pypy/dist/pypy/lib/app_test/ctypes/test_keepalive.py
==============================================================================
--- pypy/dist/pypy/lib/app_test/ctypes/test_keepalive.py	(original)
+++ pypy/dist/pypy/lib/app_test/ctypes/test_keepalive.py	Fri Feb 15 15:34:57 2008
@@ -1,3 +1,4 @@
+import py
 
 from ctypes import *
 
@@ -56,3 +57,21 @@
             pass
         cf = CFUNCTYPE(c_int, c_int)(f)
         assert cf._objects == {'0':cf}
+    
+    def test_array_of_struct_with_pointer(self):
+        py.test.skip("explodes right now")
+        class S(Structure):
+            _fields_ = [('x', c_int)]
+        PS = POINTER(S)
+
+        class Q(Structure):
+            _fields_ = [('p', PS)]
+
+        A = Q*10
+        a=A()
+        s=S()
+        s.x=3
+        a[3].p = pointer(s)
+
+        print a._objects
+        



More information about the Pypy-commit mailing list