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, terry.reedy
Date 2013-07-18.03:40:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
What I think still needs to be done.


As near as I can tell from the patch, the comments are correct except that one is needed for reformat_paragraph.

I gather that the substantive code change allows reformatting of a comment block when it is properly selected (with the beginning at the beginning of the line). The proof will be in the testing.

The middle of format_paragraph_event currently looks like

    if comment_header:
        <bunch of no-gui code>
        newdata = reformat_paragraph(data, maxformatwidth)

where reformat_paragraph is no-gui code. The comment formatting code should be pulled out into a no-gui reformat_comment function (with docstring) and replaced with in its current location with
newdata = reformat_comment(data, maxformatwidth, comment_header).


As I hinted before, the test file should begin with the simplest functions and those that do not require widgets (or mocks thereof). In the initial idle test issue #15392, Nick recommended "As much as possible, push logic testing down into the non-GUI tests." This is easiet when non-gui logic and widget manipulation are isolated in different function. When logic has already been pushed into non-gui functions, they should normally be tested first.
Is_Get_Test (with methods for is_ and get_ functions)
  would be straightforward text test cases.

FormatEventTest (split into multiple test cases)
  require widgets.

If the helper functions do not work, the functions that use them will not work. So FormatEventTest does not really test the method unless all the other tests pass.

For this file, there is the additional factor that the latter test cases (or groups of test cases) require Text methods that do not currently exist and will not be added immediately. See my message on #18425, as well as below. So they should first be implemented using the tk Text widget and requires('gui').

An advantage of starting with real widgets is that it separates problems with the tested and test files from problems with the mocks. Remember that mocks are only needed for the buildbots, not our desktops with graphics screens. 

I have not yet looked at the individual tests, but please do a patch for only these two files.
Date User Action Args
2013-07-18 03:40:07terry.reedysetrecipients: + terry.reedy, Todd.Rovito, JayKrish, philwebster
2013-07-18 03:40:07terry.reedysetmessageid: <>
2013-07-18 03:40:07terry.reedylinkissue18226 messages
2013-07-18 03:40:05terry.reedycreate