Commit 4132368d authored by Brett Cannon's avatar Brett Cannon

Issue #14599: Fix an import caching race condition.

parent ceffda82
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment