summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorMeador Inge <meadori@gmail.com>2011-11-26 04:25:06 (GMT)
committerMeador Inge <meadori@gmail.com>2011-11-26 04:25:06 (GMT)
commit0e30317891c41ada25d5459644484aef0bc8e88c (patch)
treee53014a544288d79dcb8d51ed3882b779095e874 /Lib/test/regrtest.py
parenta5d5bb997b1cb8b5d8a33d67c505ceba3bc3d9e9 (diff)
downloadcpython-0e30317891c41ada25d5459644484aef0bc8e88c.zip
cpython-0e30317891c41ada25d5459644484aef0bc8e88c.tar.gz
cpython-0e30317891c41ada25d5459644484aef0bc8e88c.tar.bz2
Issue #13380: add an internal function for resetting the ctypes caches
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index c5f19ad..5044ce4 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1076,6 +1076,13 @@ def dash_R_cleanup(fs, ps, pic, zdc, abcs):
filecmp._cache.clear()
struct._clearcache()
doctest.master = None
+ try:
+ import ctypes
+ except ImportError:
+ # Don't worry about resetting the cache if ctypes is not supported
+ pass
+ else:
+ ctypes._reset_cache()
# Collect cyclic trash.
gc.collect()