Issue #24137: Run IDLE, test_idle, and htest with tkinter default root disabled.

Fix code and tests that fail with this restriction.
Fix htests to not create a second and redundant root and mainloop.
This commit is contained in:
Terry Jan Reedy 2016-06-21 18:41:38 -04:00
parent aacd53f6cb
commit b60adc54d4
15 changed files with 92 additions and 84 deletions

View file

@ -1547,7 +1547,9 @@ def main():
enable_edit = enable_edit or edit_start
enable_shell = enable_shell or not enable_edit
# start editor and/or shell windows:
# Setup root.
if use_subprocess: # Don't break user code run in IDLE process
NoDefaultRoot()
root = Tk(className="Idle")
root.withdraw()
@ -1563,6 +1565,7 @@ def main():
icons = [PhotoImage(file=iconfile) for iconfile in iconfiles]
root.wm_iconphoto(True, *icons)
# start editor and/or shell windows:
fixwordbreaks(root)
fix_x11_paste(root)
flist = PyShellFileList(root)