summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index de0b9f0..5dfc9d4 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -697,7 +697,7 @@ def dash_R_cleanup(fs, ps, pic):
import gc, copy_reg
import _strptime, linecache, dircache
import urlparse, urllib, urllib2, mimetypes, doctest
- import struct, filecmp
+ import struct, filecmp, collections
from distutils.dir_util import _path_created
# Restore some original values.
@@ -707,6 +707,10 @@ def dash_R_cleanup(fs, ps, pic):
sys.path_importer_cache.clear()
sys.path_importer_cache.update(pic)
+ # Clear ABC registries.
+ for obj in [collections.Hashable, collections.Iterable]:
+ obj._ABCMeta__registry.clear()
+
# Clear assorted module caches.
_path_created.clear()
re.purge()