mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
d6d5148b44
commit
eac43afdc9
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue