[Python-checkins] cpython (3.3): Issue #20743: Fix a reference leak in test_tcl.

antoine.pitrou python-checkins at python.org
Sun Feb 23 19:41:59 CET 2014


http://hg.python.org/cpython/rev/38a06e411698
changeset:   89342:38a06e411698
branch:      3.3
parent:      89333:d8f48717b74e
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sun Feb 23 19:39:06 2014 +0100
summary:
  Issue #20743: Fix a reference leak in test_tcl.

files:
  Lib/test/test_tcl.py |  1 +
  Misc/NEWS            |  2 ++
  2 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -376,6 +376,7 @@
             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)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -117,6 +117,8 @@
 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.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list