Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4132368

Browse files
committed
Issue #14599: Fix an import caching race condition.
1 parent ceffda8 commit 4132368

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/test/test_import.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ def test_extension_import_fail(self):
346346
pkg_name = "extension"
347347
pkg_file = pkg_name + "{}".format("_d.pyd" if debug else ".pyd")
348348
with open(pkg_file, "w"): pass
349+
importlib.invalidate_caches()
349350
try:
350351
with self.assertRaises(ImportError) as err:
351352
import extension

0 commit comments

Comments
 (0)