mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #14599: Fix an import caching race condition.
This commit is contained in:
parent
ceffda822f
commit
4132368d0a
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue