From c9c2ba3fc1a4be1f036028bf475fa8bf1132505e Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Sat, 8 Aug 2026 12:45:02 -0500 Subject: [PATCH] idlelib tests: Fix refleak testing of test_zzdummy Create a fresh test config for each test run. --- Lib/idlelib/idle_test/test_zzdummy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/idlelib/idle_test/test_zzdummy.py b/Lib/idlelib/idle_test/test_zzdummy.py index c8e7dd6941b5899..cf928d1ddae6e66 100644 --- a/Lib/idlelib/idle_test/test_zzdummy.py +++ b/Lib/idlelib/idle_test/test_zzdummy.py @@ -11,7 +11,8 @@ usercfg = zzdummy.idleConf.userCfg -testcfg = { + +make_testcfg = lambda: { 'main': config.IdleUserConfParser(''), 'highlight': config.IdleUserConfParser(''), 'keys': config.IdleUserConfParser(''), @@ -128,7 +129,7 @@ def setUpClass(cls): root.withdraw() text = cls.text = Text(cls.root) cls.editor = DummyEditwin(root, text) - zzdummy.idleConf.userCfg = testcfg + zzdummy.idleConf.userCfg = make_testcfg() @classmethod def tearDownClass(cls):