clear zip stat cache after each ref leak run

This commit is contained in:
Benjamin Peterson 2014-01-09 11:10:30 -06:00
parent 768c16ce02
commit 50b82c765f
2 changed files with 7 additions and 9 deletions

View file

@ -338,11 +338,6 @@ 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__':