summaryrefslogtreecommitdiff
path: root/Lib/test/test_pkgutil.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-02-16 14:53:55 -0500
committerBenjamin Peterson <benjamin@python.org>2014-02-16 14:53:55 -0500
commit6755ec12efbe4807c60ee1264407a0ef20493238 (patch)
treea94f33a35b715fb14d0aca92fd72f76bcb5ce138 /Lib/test/test_pkgutil.py
parent5234a8c738eae2084312e5546b44063d7b58ecd4 (diff)
parent97fd454f353b5796e907512213ca75d3294754c5 (diff)
downloadcpython-6755ec12efbe4807c60ee1264407a0ef20493238.tar.gz
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 7a1cd41886..aaa9d8df6b 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__':