diff options
author | Brett Cannon <brett@python.org> | 2012-04-17 00:50:33 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-17 00:50:33 (GMT) |
commit | 4132368d0aeaba66195c75686dcb16d5e841bb7d (patch) | |
tree | dbc9478896f085bd8be7dd9eba33c88dd223d61e | |
parent | ceffda822f4caa26cd6dd5e0bf753c35e6bbcb80 (diff) | |
download | cpython-4132368d0aeaba66195c75686dcb16d5e841bb7d.zip cpython-4132368d0aeaba66195c75686dcb16d5e841bb7d.tar.gz cpython-4132368d0aeaba66195c75686dcb16d5e841bb7d.tar.bz2 |
Issue #14599: Fix an import caching race condition.
-rw-r--r-- | Lib/test/test_import.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 5053d49..71a1cd5 100644 --- 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() try: with self.assertRaises(ImportError) as err: import extension |