Terry J. Reedy added the comment:
Some comments on patch 6:
1. tearDownClass was omitted, resulting in boxes left on the screen, at least
when running in Idle with win7. I added this to the README.
I am also getting messages like "warning: callback failed in WindowList <class
'_tkinter.TclError'> : invalid command name ".57777664.windows" in the Idle
Shell window. The number of warnings is not deterministics.
I started idle with 'import idlelib.idle' in the console interpreter, I have
also gotten messages in the console window but no more at the moment.
When I got these with test_text, they disappeared, as I remember, when I added
root.destroy(). I do not know what is different this time.
I do not see the messages when I run in a console window.
python_d -m idlelib.idle_test.test_formatparagraph
2). The only code that needs to go in setUpClass is code that must only be
executed when the tests are run rather than when the class is defined. All the
string constants should be normal class code.
test_string = (
" \"\"\"this is a test of a reformat for a triple "
...
3) Only looking for space and tab for indent is correct. I was thinking that
perhaps we should only include the first # in comment headers, in case someone
does something like
########################################...
# real comment line
but after looking at the implementation, I decided that anyone with such a
block had better select the normal comment lines and omit the all #s line.
4) Formatting comments by stripping the header and reusing the format_paragraph
is nice -- assuming that the latter can handle imbedded blank lines. The end of
format_comments is flaky, but something that passes a test is way better than
nothing. Format_paragraph looks like it could use improvement also, but I think
we have improved FormatParagraph.py enough for now.
5. Like many, I prefer to use map with pre-existing functions and
comprehensions for new expressions.
I am polishing the tests now and might commit later today.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18226>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com