Terry J. Reedy added the comment:
Solved 'theme' problem by adding to end of tearDownClass
del cls.percolator, cls.text, cls.root
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
Roundup Robot added the comment:
New changeset ce1b14ed5445 by Terry Jan Reedy in branch '3.5':
Issue #21703: Add test for undo delegator. Patch most by Saimadhav Heblikar .
https://hg.python.org/cpython/rev/ce1b14ed5445
--
nosy: +python-dev
___
Terry J. Reedy added the comment:
Before looking at this, I ran the leak tests and found a worse problem in the
test suite. I opened #27044 and fixed the problem.
I did not get the 'theme changed' message (msg220243) when running the leak
test in the console, but did when running it either
Terry J. Reedy added the comment:
cls.percolator.close() cut leaks in half.
test_idle leaked [237, 237, 237, 237] references, sum=948
test_idle leaked [95, 97, 97, 97] memory blocks, sum=386
test_idle leaked [130, 130, 130, 130] references, sum=520
test_idle leaked [60, 62, 62, 62] memory
Saimadhav Heblikar added the comment:
It was WidgetRedirector which was leaking.
cls.percolator.redir.close() added in tearDownClass fixes the leak.
saimadhav@debian:~/dev/34-cpython$ ./python -m test -R :: -uall test_idle
[1/1] test_idle
beginning 9 repetitions
123456789
.
1 test OK.
Terry J. Reedy added the comment:
Great. I will review the next patch (with the change in the comment) tomorrow.
The ttk theme changed message comes up often. I believe it is specific to debug
builds. Perhaps you could keep track of when it occurs so we can make a guess
at the cause. I
New submission from Saimadhav Heblikar:
Adds test for UndoDelegator class in idlelib.UndoDelegator.
With the help of Victor Stinner on IRC, I managed to reduce the refleak, but
the current status is:
saimadhav@debian:~/dev/34-cpython$ ./python -m test -R 3:3 -uall test_idle
[1/1] test_idle
STINNER Victor added the comment:
You should call cls.percolator.close() in your tearDownClass() method, before
cls.text.destroy().
By the way, I prefer to assign an attribute to None instead of using del
obj.attr.
--
nosy: +haypo
___
Python