]> granicus.if.org Git - python/commitdiff
Issue #20743: Fix a reference leak in test_tcl.
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 23 Feb 2014 18:39:06 +0000 (19:39 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 23 Feb 2014 18:39:06 +0000 (19:39 +0100)
Lib/test/test_tcl.py
Misc/NEWS

index a6e95e5718f2b29b0d4d6bbacfcd0fe510d44e8d..6fa73d144fdf1677d7248a93bc1697eb52a293f4 100644 (file)
@@ -386,6 +386,7 @@ class TclTest(unittest.TestCase):
             result.append(arg)
             return arg
         self.interp.createcommand('testfunc', testfunc)
+        self.addCleanup(self.interp.tk.deletecommand, 'testfunc')
         def check(value, expected, expected2=None, eq=self.assertEqual):
             if expected2 is None:
                 expected2 = expected
index 25935002386d6a6373158c690e61cedb59b0c231..26c96c2d5e45c09656165b0d1c050386a385b8e5 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -249,6 +249,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.  Initial patch by Gareth Rees.