Correct an apparent refleak in test_pkgutil: zipimport._zip_directory_cache contains
info for all processed zip files, even when they are no longer used.
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py
index a14f091..b3fc5d8 100644
--- a/Lib/test/test_pkgutil.py
+++ b/Lib/test/test_pkgutil.py
@@ -122,6 +122,9 @@
def test_main():
run_unittest(PkgutilTests, PkgutilPEP302Tests)
+ # this is necessary if test is run repeated (like when finding leaks)
+ import zipimport
+ zipimport._zip_directory_cache.clear()
if __name__ == '__main__':
test_main()