mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
23a192d963
commit
06313b79d5
4 changed files with 114 additions and 32 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue