summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/MultiCall.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-05-24 22:48:03 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-05-24 22:48:03 (GMT)
commit62012fc719818b6087b01c93fcc1cd0d2b4d8932 (patch)
tree5104802fce85d89b4f2d186d38ec0b579f486237 /Lib/idlelib/MultiCall.py
parentd383bafa556de686be4898d6544ce998a0812532 (diff)
downloadcpython-62012fc719818b6087b01c93fcc1cd0d2b4d8932.zip
cpython-62012fc719818b6087b01c93fcc1cd0d2b4d8932.tar.gz
cpython-62012fc719818b6087b01c93fcc1cd0d2b4d8932.tar.bz2
Issue #21477: Idle htest: merge and modify run and runall; add many tests.
Patch by Saimadhav Heblikar
Diffstat (limited to 'Lib/idlelib/MultiCall.py')
-rw-r--r--Lib/idlelib/MultiCall.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/idlelib/MultiCall.py b/Lib/idlelib/MultiCall.py
index fffb820..31a4fb7 100644
--- a/Lib/idlelib/MultiCall.py
+++ b/Lib/idlelib/MultiCall.py
@@ -397,9 +397,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]):
@@ -415,8 +418,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)