This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Saimadhav.Heblikar, jesstess, python-dev, terry.reedy
Date 2014-05-25.22:47:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
0. I pushed a slight revision of the patch. See 2) for the main change. In htest, I also did 3), corrected some line spacing issues, and changed 'focussing' to the US spelling 'focusing'. A tested 2.7 version of the attached,, is top priority.

1. parent.mainloop() - ClassBrower, EditorWindow, PathBrowser: since mainloop is already running, this should have no effect. I had no problem with closing of child window closing parent. Perhaps there is an OS difference, perhaps related to the focus difference. Or this might even be a tk or tkinter bug in not masking OS differences. If the line is necessary for #nix, it seems harmless on Windows.

2. Let us remember that the purpose of htest is to test what cannot be sensibly tested with automated unittests. That includes the visual look of widgets and some behaviors that either cannot be automatically tested or that we currently do not know how to test.

The format paragragh methods and functions are well tested, better than a human will, in the current test_formatgraph unittest. I removed this part of the patch. (But see 5. below about moving it.)

When I wrote the notes that became htest.txt, a year ago, I had not written any tests other than for calltips. I listed almost all the files that had existig tests.  So don't add new tests not mentioned in htest.txt without discussion. And question the existing and proposed tests listed there.

For instance, I presume we can use the Text.tag_methods to write an automated ColorDelegator test that checks that tagged words are as expected and that colors match the configured values. We can leave the current test (with patch), until replaced.

3. Class/PathBrowser: not only does double clicking 'not work', it causes an exception to be printed to console or shell, but which seems to be ignored as test continues. The exception is either like this

Exception in Tkinter callback
Traceback (most recent call last):
  File "F:\Python\dev\4\py34\lib\idlelib\", line 121, in main
    seq, request = rpc.request_queue.get(block=True, timeout=0.05)
  File "F:\Python\dev\4\py34\lib\", line 175, in get
    raise Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "F:\Python\dev\4\py34\lib\tkinter\", line 1487, in __call__
    return self.func(*args)
  File "F:\Python\dev\4\py34\lib\idlelib\", line 122, in flip
  File "F:\Python\dev\4\py34\Lib\idlelib\", line 174, in OnDoubleClick
    edit =
AttributeError: 'module' object has no attribute 'flist'

or with just the AttributeError. Unless and until we can suppress the traceback, the message should be changed from 'not work' to 'will print a traceback for an exception that is ignored'. [done]

4. Please comment on point 4 in msg219055.

5. Possible followup idea: By reviewing and running tests for classes I have not previously paid attention to, I learned something about them.  After htest is done, polish the test explanations as appropriate to explain each class to someone not familiar with it. Revise run() to start as follows: 

def run(*tests, *, test_list=None):
    if test_list is None: test_list = []

Add (for instance) with a callable and spec for non-htested classes (and behaviors). It could begin like this
from idlelib.idle_test.htest import run

def _format_paragraph(parent): ...(such as in current patch)

_format_paragraph_spec = ...(such as in current patch)

tour_list = [(_format_paragraph, _format_paragraph_spec),]
# automate by scanning globals for callables and grabbing matching specs

This should be a separate issue that follows on this one. If you feel like expanding the above to a preliminary patch, go ahead.

6. For me, many of the htest geometry increments are too small. Example:
root.geometry("+%d+%d"%(x, y + 150) # percolator
Date User Action Args
2014-05-25 22:47:35terry.reedysetrecipients: + terry.reedy, jesstess, python-dev, Saimadhav.Heblikar
2014-05-25 22:47:33terry.reedysetmessageid: <>
2014-05-25 22:47:33terry.reedylinkissue21477 messages
2014-05-25 22:47:31terry.reedycreate