We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85ff1a0 commit d11af80Copy full SHA for d11af80
Lib/test/test_ctypes/test_pointers.py
@@ -306,6 +306,17 @@ def test_pointer_set_python_type(self):
306
with self.assertRaisesRegex(TypeError, "must have storage info"):
307
p1.set_type(int)
308
309
+ def test_pointer_type_attribute_is_none(self):
310
+ class Cls(Structure):
311
+ _fields_ = (
312
+ ('a', c_int),
313
+ ('b', c_float),
314
+ )
315
+
316
+ self.assertIsNone(Cls.__pointer_type__)
317
+ p = POINTER(Cls)
318
+ self.assertIs(Cls.__pointer_type__, p)
319
320
def test_pointer_types_factory(self):
321
"""Shouldn't leak"""
322
def factory():
0 commit comments