Issue #20743: Fix a reference leak in test_tcl.

This commit is contained in:
Antoine Pitrou 2014-02-23 19:39:06 +01:00
parent 1be39e5154
commit 220cc21cec
2 changed files with 3 additions and 0 deletions

View File

@ -376,6 +376,7 @@ class TclTest(unittest.TestCase):
result = arg
return arg
self.interp.createcommand('testfunc', testfunc)
self.addCleanup(self.interp.tk.deletecommand, 'testfunc')
def check(value, expected, eq=self.assertEqual):
r = self.interp.call('testfunc', value)
self.assertIsInstance(result, str)

View File

@ -117,6 +117,8 @@ IDLE
Tests
-----
- Issue #20743: Fix a reference leak in test_tcl.
- Issue #20510: Rewrote test_exit in test_sys to match existing comments,
use modern unittest features, and use helpers from test.script_helper
instead of using subprocess directly. Patch by Gareth Rees.