summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pkgutil.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-02-16 19:53:55 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-02-16 19:53:55 (GMT)
commitf617fa88debe53584b9986f86d9f5c4e2397d5f1 (patch)
treecd5be5b867a7240f9754b5350a94a26cf8d07b06 /Lib/test/test_pkgutil.py
parentec91cd60406f5ff51a5fbb27fd32091f93b3ca92 (diff)
parentcf626032763077bf959937705ed35f9e2b40a862 (diff)
downloadcpython-f617fa88debe53584b9986f86d9f5c4e2397d5f1.zip
cpython-f617fa88debe53584b9986f86d9f5c4e2397d5f1.tar.gz
cpython-f617fa88debe53584b9986f86d9f5c4e2397d5f1.tar.bz2
merge 3.3
Diffstat (limited to 'Lib/test/test_pkgutil.py')
-rw-r--r--Lib/test/test_pkgutil.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py
index 7a1cd41..aaa9d8d 100644
--- a/Lib/test/test_pkgutil.py
+++ b/Lib/test/test_pkgutil.py
@@ -349,6 +349,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__':