ยปCore Development>Code coverage>Lib/test/leakers/test_ctypes.py

Python code coverage for Lib/test/leakers/test_ctypes.py

#countcontent
1n/a
2n/a# Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test().
3n/a
4n/afrom ctypes import Structure, c_int, POINTER
5n/aimport gc
6n/a
7n/adef leak_inner():
8n/a class POINT(Structure):
9n/a _fields_ = [("x", c_int)]
10n/a class RECT(Structure):
11n/a _fields_ = [("a", POINTER(POINT))]
12n/a
13n/adef leak():
14n/a leak_inner()
15n/a gc.collect()