mirror of https://github.com/python/cpython
Issue #14599: Fix an import caching race condition.
This commit is contained in:
parent
ceffda822f
commit
4132368d0a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue