Terry J. Reedy added the comment:

Refinement 1: in doing coverage for UndoDelegator, I noticed that the htest 
function is counted as missing (uncovered). Both of the following in 
.coveragerc work to ignore the block: name prefix; comment suffix.
        def htest_.*:
        .*# htest #
The second is more practical for alphabetical order in htest. It is also less 
work to change. The particular form marks it as not a normal comment.

Refinement 2: put all imports that are specific to the htest function at the 
top of the function. Since the function is only called once per process, there 
is no efficiency consideration. I decided that after the tkinter import at the 
top got me (wasting time) looking through UndoDelegator for a widget call that 
might be the source of the leak. The changes can wait until we edit the file 
anyway, or at least write a test.

However, the docstring at the top of htest.py should be changed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21624>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to