Skip to content

Commit aa73ea0

Browse files
committed
Issue #20743: Fix a reference leak in test_tcl.
1 parent 82c2587 commit aa73ea0

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_tcl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ def testfunc(arg):
386386
result.append(arg)
387387
return arg
388388
self.interp.createcommand('testfunc', testfunc)
389+
self.addCleanup(self.interp.tk.deletecommand, 'testfunc')
389390
def check(value, expected, expected2=None, eq=self.assertEqual):
390391
if expected2 is None:
391392
expected2 = expected

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ IDLE
249249
Tests
250250
-----
251251

252+
- Issue #20743: Fix a reference leak in test_tcl.
253+
252254
- Issue #20510: Rewrote test_exit in test_sys to match existing comments,
253255
use modern unittest features, and use helpers from test.script_helper
254256
instead of using subprocess directly. Initial patch by Gareth Rees.

0 commit comments

Comments
 (0)