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
Refleak in idle_test test_autocomplete #65881
Comments
The recently added test_autocomplete seems to be hanging onto a reference somewhere that it shouldn't be, see below. This output was obtained by running [1/1] test_idle |
The patch fixes the refleak. Importing EditorWindow, was perhaps the cause. It uses a dummy editwin instead. With reference to the current test, was there a particular reason to import real EditorWindow module? |
This concerns me. I expect that we will eventually want to test a live EditorWindow or subclass. It appears that root.destroy does not clear all the widgets created by EditorWindow(root=root). My guess it that something is created without passing in root, so that tkinter._default_root gets used instead. This needs investigation. I actually ran into this problem before, though not in full form, as I did not commit test_formatparagraph.py with EditorWindow(). I used a mock containing a method extracted from EditorWindow that does not cause problems, after noting the following. # A real EditorWindow creates unneeded, time-consuming baggage and Why did I commit this with EditorWindow used as is? Because I forgot the above, written last August and did not think to see how easy it would be to mock the minimum needed. I need to make sure to put DO NOT USE EditorWindow ... in README.txt. I did not get the error message in several all ok runs. We can worry later about using mock Text for a non-gui alternative. Thanks Zack for catching this and Saimadhav to fixing it. |
Terry, did you mean to push Saimadhav's patch? |
New changeset b8f33440cd5e by Terry Jan Reedy in branch '2.7': New changeset e6cc02d32957 by Terry Jan Reedy in branch '3.4': New changeset 30c2f65a6346 by Terry Jan Reedy in branch '2.7': New changeset 7f14a2c10c09 by Terry Jan Reedy in branch '3.4': |
Checking the buildbot just now, there is some other stuff after test_tk on X86 Windows 7, but I ran the command you gave (but with python_d) and it passed ok. So I presume this is really fixed and should stay closed. |
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: