This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Saimadhav.Heblikar, terry.reedy, zach.ware
Date 2014-06-07.08:32:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402129946.17.0.875565736504.issue21682@psf.upfronthosting.co.za>
In-reply-to
Content
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
# sometimes emits shutdown warnings like this:
# "warning: callback failed in WindowList <class '_tkinter.TclError'>
# : invalid command name ".55131368.windows".
# Calling EditorWindow._close in tearDownClass prevents this but causes
# other problems (windows left open).

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.
History
Date User Action Args
2014-06-07 08:32:26terry.reedysetrecipients: + terry.reedy, zach.ware, Saimadhav.Heblikar
2014-06-07 08:32:26terry.reedysetmessageid: <1402129946.17.0.875565736504.issue21682@psf.upfronthosting.co.za>
2014-06-07 08:32:26terry.reedylinkissue21682 messages
2014-06-07 08:32:25terry.reedycreate