summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorMeador Inge <meadori@gmail.com>2011-11-26 04:37:44 (GMT)
committerMeador Inge <meadori@gmail.com>2011-11-26 04:37:44 (GMT)
commit4bc45b7a9f5fc849ee13699e3da8d483188fe90b (patch)
tree9ab06fe735d92ac06e0f845a02e6f1cc45b22a51 /Lib/test/regrtest.py
parent4d098735c6b96afd495aaa6256a4855706043812 (diff)
parent11e381310bb5f498186098855f843c2e07e7ea82 (diff)
downloadcpython-4bc45b7a9f5fc849ee13699e3da8d483188fe90b.zip
cpython-4bc45b7a9f5fc849ee13699e3da8d483188fe90b.tar.gz
cpython-4bc45b7a9f5fc849ee13699e3da8d483188fe90b.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 f859c51..cfae1f0 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1401,6 +1401,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()