diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-01-09 17:10:30 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-01-09 17:10:30 (GMT) |
commit | 27b029bd001caf66cfb8c732ccab2253f3b64a4e (patch) | |
tree | 46efe175865522a45f9c7ff19d184a7633ea6d0d /Lib/test/test_pkgutil.py | |
parent | 7251fe10ffc168f5cdf31c431d9230ec6f3b51f6 (diff) | |
download | cpython-27b029bd001caf66cfb8c732ccab2253f3b64a4e.zip cpython-27b029bd001caf66cfb8c732ccab2253f3b64a4e.tar.gz cpython-27b029bd001caf66cfb8c732ccab2253f3b64a4e.tar.bz2 |
clear zip stat cache after each ref leak run
Diffstat (limited to 'Lib/test/test_pkgutil.py')
-rw-r--r-- | Lib/test/test_pkgutil.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py index f665e96..382474d 100644 --- a/Lib/test/test_pkgutil.py +++ b/Lib/test/test_pkgutil.py @@ -133,9 +133,7 @@ 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() |