New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_tcl memory leak #64942
Comments
Witnessed on 2.7, 3.3, 3.4: $ ./python -m test -uall -R3:3 test_tcl
[1/1] test_tcl
beginning 6 repetitions
123456
......
test_tcl leaked [12, 12, 12] references, sum=36
test_tcl leaked [5, 5, 5] memory blocks, sum=15 |
This actually appeared with 89b738e3d0c9, i.e. it's not a regression but an existing leak that was uncovered by a new test. |
Actually, this looks mostly like a cleanup issue in the tests. Following patch seems to solve it: 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 @@ 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) |
LGTM. There is a little related but more complex bpo-1524639. |
New changeset 38a06e411698 by Antoine Pitrou in branch '3.3': New changeset 10b1f60a72fa by Antoine Pitrou in branch 'default': |
New changeset 00393de6919d by Antoine Pitrou in branch '2.7': |
Ok, fixed now. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: