diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-04-20 21:02:21 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-04-20 21:02:21 (GMT) |
commit | eac43afdc9e06c5edc5ac2c19e40126a8e455bed (patch) | |
tree | 96f48859f33cd62edb39527366b58ff631e47152 | |
parent | d6d5148b44cfd6472a3ff319b15f8c3f9953bba5 (diff) | |
download | cpython-eac43afdc9e06c5edc5ac2c19e40126a8e455bed.zip cpython-eac43afdc9e06c5edc5ac2c19e40126a8e455bed.tar.gz cpython-eac43afdc9e06c5edc5ac2c19e40126a8e455bed.tar.bz2 |
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.
-rw-r--r-- | Lib/test/test_pkgutil.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 @@ 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() |