Commit cce2267c authored by Thomas Heller's avatar Thomas Heller

Plug a leak in the ctypes test suite when tests are run repeatedly.

parent d59ca8f3
......@@ -140,5 +140,10 @@ class PointerToStructure(unittest.TestCase):
r.a[0].x = 42
r.a[0].y = 99
# to avoid leaking when tests are run several times
# clean up the types left in the cache.
from ctypes import _pointer_type_cache
del _pointer_type_cache[POINT]
if __name__ == "__main__":
unittest.main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment