mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #21477: Idle htest: merge and modify run and runall; add many tests.
Patch by Saimadhav Heblikar
This commit is contained in:
parent
10cbb1e463
commit
1b392ffe67
18 changed files with 412 additions and 179 deletions
|
@ -420,9 +420,12 @@ def MultiCallCreator(widget):
|
|||
_multicall_dict[widget] = MultiCall
|
||||
return MultiCall
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Test
|
||||
|
||||
def _multi_call(parent):
|
||||
root = tkinter.Tk()
|
||||
root.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)
|
||||
text.pack()
|
||||
def bindseq(seq, n=[0]):
|
||||
|
@ -438,8 +441,13 @@ if __name__ == "__main__":
|
|||
bindseq("<Alt-Control-Key-a>")
|
||||
bindseq("<Key-b>")
|
||||
bindseq("<Control-Button-1>")
|
||||
bindseq("<Button-2>")
|
||||
bindseq("<Alt-Button-1>")
|
||||
bindseq("<FocusOut>")
|
||||
bindseq("<Enter>")
|
||||
bindseq("<Leave>")
|
||||
root.mainloop()
|
||||
|
||||
if __name__ == "__main__":
|
||||
from idlelib.idle_test.htest import run
|
||||
run(_multi_call)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue