From: Antoine Pitrou Date: Sun, 23 Feb 2014 18:39:06 +0000 (+0100) Subject: Issue #20743: Fix a reference leak in test_tcl. X-Git-Tag: v2.7.7rc1~158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa73ea0408d4fc062b765586bdce5af0021ebbf2;p=python Issue #20743: Fix a reference leak in test_tcl. --- diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index a6e95e5718..6fa73d144f 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -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 diff --git a/Misc/NEWS b/Misc/NEWS index 2593500238..26c96c2d5e 100644 --- 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.