Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin

consolidating and improving human-validated tests of Idle. Change other files
as needed to work with htest.  Running the module as __main__ runs all tests.
This commit is contained in:
Terry Jan Reedy 2014-05-11 23:32:32 -04:00
parent 23a192d963
commit 06313b79d5
4 changed files with 114 additions and 32 deletions

View file

@ -12,7 +12,7 @@ class AboutDialog(Toplevel):
"""Modal about dialog for idle
"""
def __init__(self,parent,title):
def __init__(self, parent, title):
Toplevel.__init__(self, parent)
self.configure(borderwidth=5)
self.geometry("+%d+%d" % (parent.winfo_rootx()+30,
@ -136,10 +136,5 @@ class AboutDialog(Toplevel):
self.destroy()
if __name__ == '__main__':
# test the dialog
root = Tk()
def run():
from idlelib import aboutDialog
aboutDialog.AboutDialog(root, 'About')
Button(root, text='Dialog', command=run).pack()
root.mainloop()
from idlelib.idle_test.htest import run
run(AboutDialog)