cpython: 00a07720a570 (original) (raw)
Mercurial > cpython
changeset 76370:00a07720a570
Issue #14599: Fix an import caching race condition. [#14599]
Brett Cannon brett@python.org | |
---|---|
date | Mon, 16 Apr 2012 20:50:33 -0400 |
parents | eae7cc54d28b |
children | 3b5b4b4bb43c |
files | Lib/test/test_import.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-)[+] [-] Lib/test/test_import.py 1 |
line wrap: on
line diff
--- 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()[](#l1.7) try:[](#l1.8) with self.assertRaises(ImportError) as err:[](#l1.9) import extension[](#l1.10)