gh-66819: More IDLE htest updates(2) (#112642)

Examine and update spec -- callable pairs.
Revise run method.
This commit is contained in:
Terry Jan Reedy 2023-12-03 04:28:37 -05:00 committed by GitHub
parent a9574c68f0
commit 3855b45874
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 70 additions and 69 deletions

View file

@ -396,10 +396,11 @@ class IOBinding:
def _io_binding(parent): # htest #
from tkinter import Toplevel, Text
root = Toplevel(parent)
root.title("Test IOBinding")
top = Toplevel(parent)
top.title("Test IOBinding")
x, y = map(int, parent.geometry().split('+')[1:])
root.geometry("+%d+%d" % (x, y + 175))
top.geometry("+%d+%d" % (x, y + 175))
class MyEditWin:
def __init__(self, text):
self.text = text
@ -423,7 +424,7 @@ def _io_binding(parent): # htest #
def savecopy(self, event):
self.text.event_generate("<<save-copy-of-window-as-file>>")
text = Text(root)
text = Text(top)
text.pack()
text.focus_set()
editwin = MyEditWin(text)