Skip to content

Commit c9c2ba3

Browse files
committed
idlelib tests: Fix refleak testing of test_zzdummy
Create a fresh test config for each test run.
1 parent 998b890 commit c9c2ba3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/idlelib/idle_test/test_zzdummy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212

1313
usercfg = zzdummy.idleConf.userCfg
14-
testcfg = {
14+
15+
make_testcfg = lambda: {
1516
'main': config.IdleUserConfParser(''),
1617
'highlight': config.IdleUserConfParser(''),
1718
'keys': config.IdleUserConfParser(''),
@@ -128,7 +129,7 @@ def setUpClass(cls):
128129
root.withdraw()
129130
text = cls.text = Text(cls.root)
130131
cls.editor = DummyEditwin(root, text)
131-
zzdummy.idleConf.userCfg = testcfg
132+
zzdummy.idleConf.userCfg = make_testcfg()
132133

133134
@classmethod
134135
def tearDownClass(cls):

0 commit comments

Comments
 (0)