summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-27 23:34:59 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-27 23:34:59 (GMT)
commit908caac52e8e62baa1ee54e4e650e1cd3ac37907 (patch)
tree291efd46f16d74de6e49bba69f785883c6cdfcc1 /Lib/test/regrtest.py
parent3ea7b41b5805c60a05e697211d0bfc14a62a19fb (diff)
downloadcpython-908caac52e8e62baa1ee54e4e650e1cd3ac37907.zip
cpython-908caac52e8e62baa1ee54e4e650e1cd3ac37907.tar.gz
cpython-908caac52e8e62baa1ee54e4e650e1cd3ac37907.tar.bz2
Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 1da6967..72d1039 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -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):