Kaydet (Commit) eac43afd authored tarafından Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

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.
üst d6d5148b
......@@ -122,6 +122,9 @@ class PkgutilPEP302Tests(unittest.TestCase):
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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment