Added clear cache methods to clear the internal type lookup cache for ref leak test runs.

This commit is contained in:
Christian Heimes 2008-01-27 23:34:59 +00:00
parent 3ea7b41b58
commit 908caac52e
8 changed files with 55 additions and 0 deletions

View file

@ -709,6 +709,9 @@ def dash_R_cleanup(fs, ps, pic, abcs):
sys.path_importer_cache.clear()
sys.path_importer_cache.update(pic)
# clear type cache
sys._cleartypecache()
# Clear ABC registries, restoring previously saved ABC registries.
for abc in [getattr(_abcoll, a) for a in _abcoll.__all__]:
if not issubclass(abc, _Abstract):