diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-02-16 19:52:01 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-02-16 19:52:01 (GMT) |
commit | cf626032763077bf959937705ed35f9e2b40a862 (patch) | |
tree | bed221f523db3a118706cc9bf1a451b6e0aebcae /Lib/test/test_pkgutil.py | |
parent | eb43736de2a746369dd42f406bc705ec413f2e72 (diff) | |
download | cpython-cf626032763077bf959937705ed35f9e2b40a862.zip cpython-cf626032763077bf959937705ed35f9e2b40a862.tar.gz cpython-cf626032763077bf959937705ed35f9e2b40a862.tar.bz2 |
backout fafac90b69c4
Diffstat (limited to 'Lib/test/test_pkgutil.py')
-rw-r--r-- | Lib/test/test_pkgutil.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py index 0db4fc6..fd06614 100644 --- a/Lib/test/test_pkgutil.py +++ b/Lib/test/test_pkgutil.py @@ -338,6 +338,11 @@ class ImportlibMigrationTests(unittest.TestCase): def test_main(): run_unittest(PkgutilTests, PkgutilPEP302Tests, ExtendPathTests, NestedNamespacePackageTest, ImportlibMigrationTests) + # this is necessary if test is run repeated (like when finding leaks) + import zipimport + import importlib + zipimport._zip_directory_cache.clear() + importlib.invalidate_caches() if __name__ == '__main__': |