From 4132368d0aeaba66195c75686dcb16d5e841bb7d Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 16 Apr 2012 20:50:33 -0400 Subject: Issue #14599: Fix an import caching race condition. --- Lib/test/test_import.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 5053d49..71a1cd5 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -346,6 +346,7 @@ class ImportTests(unittest.TestCase): pkg_name = "extension" pkg_file = pkg_name + "{}".format("_d.pyd" if debug else ".pyd") with open(pkg_file, "w"): pass + importlib.invalidate_caches() try: with self.assertRaises(ImportError) as err: import extension -- cgit v0.12