Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 220cc21

Browse files
committed
Issue #20743: Fix a reference leak in test_tcl.
1 parent 1be39e5 commit 220cc21

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
@@ -376,6 +376,7 @@ def testfunc(arg):
376376
result = arg
377377
return arg
378378
self.interp.createcommand('testfunc', testfunc)
379+
self.addCleanup(self.interp.tk.deletecommand, 'testfunc')
379380
def check(value, expected, eq=self.assertEqual):
380381
r = self.interp.call('testfunc', value)
381382
self.assertIsInstance(result, str)

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ IDLE
117117
Tests
118118
-----
119119

120+
- Issue #20743: Fix a reference leak in test_tcl.
121+
120122
- Issue #20510: Rewrote test_exit in test_sys to match existing comments,
121123
use modern unittest features, and use helpers from test.script_helper
122124
instead of using subprocess directly. Patch by Gareth Rees.

0 commit comments

Comments
 (0)