From a0f5bb7c3247ebd17b06800148eecce694cfc9ae Mon Sep 17 00:00:00 2001 From: sunmy2019 <59365878+sunmy2019@users.noreply.github.com> Date: Tue, 30 May 2023 18:54:38 +0800 Subject: [PATCH] Update Lib/test/test_import/__init__.py Co-authored-by: Erlend E. Aasland --- Lib/test/test_import/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index f99f8b2b238c0a..d0ad978e72847c 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -2389,7 +2389,7 @@ def test_with_reinit_reloaded(self): loaded = self.load(name) reloaded = self.re_load(name, loaded.module) - if name == f'{self.NAME}_with_state': + if name.endswith("_with_state"): self.addCleanup(loaded.module._clear_module_state) self.addCleanup(reloaded.module._clear_module_state)