mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue