summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-02-23 18:39:06 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2014-02-23 18:39:06 (GMT)
commit220cc21cec3716ca94d63fea51d30ae84274d8cc (patch)
tree6769f311e34b8c42f2a6f607e9f868f434e353ea /Lib/test/test_tcl.py
parent1be39e515444a21b1168862368970ed8bd4a2d64 (diff)
downloadcpython-220cc21cec3716ca94d63fea51d30ae84274d8cc.zip
cpython-220cc21cec3716ca94d63fea51d30ae84274d8cc.tar.gz
cpython-220cc21cec3716ca94d63fea51d30ae84274d8cc.tar.bz2
Issue #20743: Fix a reference leak in test_tcl.
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index dda0c7a..5226ee6 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -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)