Kaydet (Commit) 220cc21c authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #20743: Fix a reference leak in test_tcl.

üst 1be39e51
...@@ -376,6 +376,7 @@ class TclTest(unittest.TestCase): ...@@ -376,6 +376,7 @@ class TclTest(unittest.TestCase):
result = arg result = arg
return arg return arg
self.interp.createcommand('testfunc', testfunc) self.interp.createcommand('testfunc', testfunc)
self.addCleanup(self.interp.tk.deletecommand, 'testfunc')
def check(value, expected, eq=self.assertEqual): def check(value, expected, eq=self.assertEqual):
r = self.interp.call('testfunc', value) r = self.interp.call('testfunc', value)
self.assertIsInstance(result, str) self.assertIsInstance(result, str)
......
...@@ -117,6 +117,8 @@ IDLE ...@@ -117,6 +117,8 @@ IDLE
Tests Tests
----- -----
- Issue #20743: Fix a reference leak in test_tcl.
- Issue #20510: Rewrote test_exit in test_sys to match existing comments, - Issue #20510: Rewrote test_exit in test_sys to match existing comments,
use modern unittest features, and use helpers from test.script_helper use modern unittest features, and use helpers from test.script_helper
instead of using subprocess directly. Patch by Gareth Rees. instead of using subprocess directly. Patch by Gareth Rees.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment