mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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:
parent
aacd53f6cb
commit
b60adc54d4
15 changed files with 92 additions and 84 deletions
|
@ -414,12 +414,12 @@ def MultiCallCreator(widget):
|
|||
return MultiCall
|
||||
|
||||
|
||||
def _multi_call(parent):
|
||||
root = tkinter.Tk()
|
||||
root.title("Test MultiCall")
|
||||
def _multi_call(parent): # htest #
|
||||
top = tkinter.Toplevel(parent)
|
||||
top.title("Test MultiCall")
|
||||
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
|
||||
root.geometry("+%d+%d"%(x, y + 150))
|
||||
text = MultiCallCreator(tkinter.Text)(root)
|
||||
top.geometry("+%d+%d"%(x, y + 150))
|
||||
text = MultiCallCreator(tkinter.Text)(top)
|
||||
text.pack()
|
||||
def bindseq(seq, n=[0]):
|
||||
def handler(event):
|
||||
|
@ -439,7 +439,6 @@ def _multi_call(parent):
|
|||
bindseq("<FocusOut>")
|
||||
bindseq("<Enter>")
|
||||
bindseq("<Leave>")
|
||||
root.mainloop()
|
||||
|
||||
if __name__ == "__main__":
|
||||
from idlelib.idle_test.htest import run
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue