(original) (raw)

changeset: 76370:00a07720a570 user: Brett Cannon brett@python.org date: Mon Apr 16 20:50:33 2012 -0400 files: Lib/test/test_import.py description: Issue #14599: Fix an import caching race condition. diff -r eae7cc54d28b -r 00a07720a570 Lib/test/test_import.py --- a/Lib/test/test_import.py Mon Apr 16 20:48:50 2012 -0400 +++ b/Lib/test/test_import.py Mon Apr 16 20:50:33 2012 -0400 @@ -346,6 +346,7 @@ 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 /brett@python.org