After using idle-test/htest.py and individual htests when editing files, a few updates are needed.
Improve the docstring for htest.py; add info about "# htest #".
Use Toplevel(parent) instead of Tk() for test-specific childs windows of the main, master window. Currently, for some tests, such as CallTipWindow, the focus does not properly shift to the test window. Closing the master window first leaves the test window open. Closing the test window second then causes several tcl errors (printed to console if available), a Windows message, and an Idle freeze of 5 seconds or more before Idle works again. The change in this initial patch fixes the focus, non-close, error, and hang problems. One click and the test window is ready to go; one click on the master and both go away.
Coding style issues -- I prefer to use winfo_rootx/y, as done elsewhere in Idle, to using re (close call). For CallTipWindow, the inner class is not needed now, if it ever was.
I reviewed and edited htest.py docstring and specs up to grep. Unfortunately, things were not quite alphabetical. Reviewed and edited corresponding idlelib module callables up to first line of grep._grep_dialog. I am pushing this as a first chunk.
As far as I can tell, the entire diff in @htest-34-2.diff was pushed. My comment about 'up to first line of grep' was correct alphabetically but confusing because files with a '# htest #' section were not completely alphabetical in the file. I need to review current code in light of this issue and a couple of others.
First patch: Review docstring again. Alphabetize specs.
Later: Review spec and callable grep onwards.
Any closing issues not fixed in edit consider in #112569.
Activity
terryjreedy commented on Oct 14, 2014
After using idle-test/htest.py and individual htests when editing files, a few updates are needed.
Improve the docstring for htest.py; add info about "# htest #".
Use Toplevel(parent) instead of Tk() for test-specific childs windows of the main, master window. Currently, for some tests, such as CallTipWindow, the focus does not properly shift to the test window. Closing the master window first leaves the test window open. Closing the test window second then causes several tcl errors (printed to console if available), a Windows message, and an Idle freeze of 5 seconds or more before Idle works again. The change in this initial patch fixes the focus, non-close, error, and hang problems. One click and the test window is ready to go; one click on the master and both go away.
Coding style issues -- I prefer to use winfo_rootx/y, as done elsewhere in Idle, to using re (close call). For CallTipWindow, the inner class is not needed now, if it ever was.
terryjreedy commented on Oct 17, 2014
I reviewed and edited htest.py docstring and specs up to grep. Unfortunately, things were not quite alphabetical. Reviewed and edited corresponding idlelib module callables up to first line of grep._grep_dialog. I am pushing this as a first chunk.
Covered _calltip_window, ClassBrowser, _color_delegator, ConfigDialog, _dyn_option_menu, _editor_window, _grep_dialog. Checked x(parent), # htest #, (htest in widget), TopLevel(parent), winfo_x, bindings: see _calltip_window.
python-dev commented on Oct 17, 2014
New changeset f5be7fc270d1 by Terry Jan Reedy in branch '2.7':
Issue bpo-22629: Revise idle_test.htest, mostly docstring. Start revision of
https://hg.python.org/cpython/rev/f5be7fc270d1
New changeset e73f1d813f1f by Terry Jan Reedy in branch '3.4':
Issue bpo-22629: Revise idle_test.htest, mostly docstring. Start revision of
https://hg.python.org/cpython/rev/e73f1d813f1f
New changeset d8ac11794f26 by Terry Jan Reedy in branch 'default':
Merge with 3.4: Issue bpo-22629
https://hg.python.org/cpython/rev/d8ac11794f26
terryjreedy commented on Feb 21, 2019
As far as I can tell, the entire diff in @htest-34-2.diff was pushed. My comment about 'up to first line of grep' was correct alphabetically but confusing because files with a '# htest #' section were not completely alphabetical in the file. I need to review current code in light of this issue and a couple of others.
terryjreedy commented on Dec 1, 2023
First patch: Review docstring again. Alphabetize specs.
Later: Review spec and callable grep onwards.
Any closing issues not fixed in edit consider in #112569.
pythongh-66819: More IDLE htest updates
gh-66819: More IDLE htest updates (#112574)
17 remaining items
gh-66819: More IDLE htest updates(4) (#112686)
pythongh-66819: More IDLE htest updates(4) (pythonGH-112686)
pythongh-66819: More IDLE htest updates(4) (pythonGH-112686)
[3.11] gh-66819: More IDLE htest updates(4) (GH-112686) (#112689)
[3.12] gh-66819: More IDLE htest updates(4) (GH-112686) (#112688)
pythongh-66819: More IDLE htest updates (python#112574)
pythongh-66819: More IDLE htest updates(2) (python#112642)
pythongh-66819: More IDLE htest updates(3) (python#112683)
pythongh-66819: More IDLE htest updates(4) (python#112686)
pythongh-66819: More IDLE htest updates (python#112574)
pythongh-66819: More IDLE htest updates(2) (python#112642)
pythongh-66819: More IDLE htest updates(3) (python#112683)
pythongh-66819: More IDLE htest updates(4) (python#112686)