diff options
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 10b515b..cbbf1ca 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -1255,6 +1255,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() |