Issue #20743: Fix a reference leak in test_tcl.

This commit is contained in:
Antoine Pitrou 2014-02-23 19:41:51 +01:00
commit 8a14ea4694
2 changed files with 6 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)