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 JayKrish, Todd.Rovito, philwebster, roger.serwy, terry.reedy
Date 2013-07-28.23:13:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375053196.53.0.113354180952.issue18226@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-07-28 23:13:16terry.reedysetrecipients: + terry.reedy, roger.serwy, Todd.Rovito, JayKrish, philwebster
2013-07-28 23:13:16terry.reedysetmessageid: <1375053196.53.0.113354180952.issue18226@psf.upfronthosting.co.za>
2013-07-28 23:13:16terry.reedylinkissue18226 messages
2013-07-28 23:13:16terry.reedycreate