[Python-checkins] r45788 - python/trunk/Lib/ctypes/test/test_pointers.py

thomas.heller python-checkins at python.org
Fri Apr 28 19:02:19 CEST 2006


Author: thomas.heller
Date: Fri Apr 28 19:02:18 2006
New Revision: 45788

Modified:
   python/trunk/Lib/ctypes/test/test_pointers.py
Log:
Remove a duplicated test (the same test is in test_incomplete.py).

Modified: python/trunk/Lib/ctypes/test/test_pointers.py
==============================================================================
--- python/trunk/Lib/ctypes/test/test_pointers.py	(original)
+++ python/trunk/Lib/ctypes/test/test_pointers.py	Fri Apr 28 19:02:18 2006
@@ -133,27 +133,6 @@
         self.failUnlessEqual(p[0], 42)
         self.failUnlessEqual(p.contents.value, 42)
 
-    def test_incomplete(self):
-        lpcell = POINTER("cell")
-        class cell(Structure):
-            _fields_ = [("value", c_int),
-                        ("next", lpcell)]
-        SetPointerType(lpcell, cell)
-
-        # Make a structure containing a pointer to itself:
-        c = cell()
-        c.value = 42
-        c.next = pointer(c)
-
-        result = []
-        for i in range(8):
-            result.append(c.value)
-            c = c.next[0]
-        self.failUnlessEqual(result, [42] * 8)
-
-        from ctypes import _pointer_type_cache
-        del _pointer_type_cache[cell]
-
     def test_charpp( self ):
         """Test that a character pointer-to-pointer is correctly passed"""
         dll = CDLL(_ctypes_test.__file__)


More information about the Python-checkins mailing list