[issue21477] Idle: improve idle_test.htest

Terry J. Reedy report at bugs.python.org
Sat May 24 23:10:11 CEST 2014


Terry J. Reedy added the comment:

run-runall.diff import cleanly to 3.4. Running all the tests works well enough that I am applying this, with minor changes, to be a base for further patches. Good job.

The few problems I fixed:
1. AutoCompleteWindow.py had \n added at the beginning. I just deleted it.
2. 2 files had an unused 'import tkinter'. I deleted those lines. (Any new imports, that are used, should be 'import tkinter as tk' so that is the only place where the Tkinter/tkinter change shows up in the Idle file.)
3. patchcheck found 7 files with extra whitespace to be deleted.

Things to do starting from this.

1. See review comments on htest.run(). 

2. See review comments on text changes.

3. See review comments on individual tests.  There will be more of these, but run changes and 4) below are the most important now.

4. Many wrappers create a separate root=Tk() (and mainloop) ins4tead of reusing the parent arg. The result is that clicking [Next] does not delete the test window, as it is not a child of the main window. The test window has to be closed separately. So unless the test *requires* a new root and mainloop, please delete them. (Modal dialogs have to be closed explicitly - message should say so.)

5. When I changed root = tk.Tk() to root = parent in _editor_window, the test seemed to continue to work fine. Why did you comment it out? Please restore it and make any change necessary to _editor_window to work with the revised run().

----------
Added file: http://bugs.python.org/file35342/run-runall-34.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21477>
_______________________________________


More information about the Python-bugs-list mailing list