From 1b10a4f37aa311188743af5853d491bb5b36e927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Mon, 5 Jan 2026 17:25:48 +0100 Subject: [PATCH] gh-69605: In test_pyrepl.test_already_imported*, invalidate FS import caches --- Lib/test/test_pyrepl/test_pyrepl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py index 961787b6f9058b..baf03ef6cd95ee 100644 --- a/Lib/test/test_pyrepl/test_pyrepl.py +++ b/Lib/test/test_pyrepl/test_pyrepl.py @@ -1192,6 +1192,7 @@ def test_already_imported_module_without_origin_or_spec(self): (dir1 / mod).mkdir() (dir1 / mod / "__init__.py").touch() (dir1 / mod / "foo.py").touch() + pkgutil.get_importer(_dir1).invalidate_caches() module = importlib.import_module(mod) assert module.__spec__ if mod == "no_origin":