Author terry.reedy
Recipients Saimadhav.Heblikar, terry.reedy
Date 2014-06-03.05:58:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Idle unittests that use tkinter.Text are developed using the gui widget and then switched, to the current extent possible, to mock_tk.Text. I have done this previously by commenting out gui lines and adding new lines, so it would be possible to switch back if needed. test_searchengine is an example. However, switching back would require commenting and uncommenting several lines.

When reviewing test_autoexpand #18292, I realized that everything after the imports

from tkinter import Text
from idlelib.idle_text.mock_tk import Text

can be made conditional on 'tkinter in str(Text)'. The only comment switching needed is for the import lines. This issue is about retrofitting test_searchengine and any other files that need it.
Date User Action Args
2014-06-03 05:58:40terry.reedysetrecipients: + terry.reedy, Saimadhav.Heblikar
2014-06-03 05:58:40terry.reedysetmessageid: <>
2014-06-03 05:58:40terry.reedylinkissue21647 messages
2014-06-03 05:58:40terry.reedycreate