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-05.02:28:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I want to make two separate commits. First add mock Text into, and add a new I suggested looking at the tkinter Text test. I turns out that it only tests a few special search cases. I am guessing that they have something to do with the tkinter interface. If neither you nor Todd feel like writing the Text test, I will. Let me know either way.

Second, add the new mock_idle and test_rstrip files. For the latter, at least one line should have no whitespace, and one should have an indent. With an indent, the test would fail if rstrip in the tested file were changed to strip.

In the tearDown method, the apparent purpose of
        self.rstripextension = None
is to actually do
        del self.rstripextension
and that happens automatically when self disappears.
With a mock editor window, there is no need for "root.destroy" and hence for the close call, and hence for the tearDown method.

With only one test method, the setUp lines can be part of the test. For the attribute names, I strongly prefer 'rstrip' to 'rstripExtension' and 'editor' to 'mockEditorWindow'.

I am curious about this comment:
# Note: Tkinter always adds a newline at the end of the text widget,
# hence the newline in the expected_text string

In live Idle, I tried 'strip trailing whitespace' with text that did not end with \n and there was none visible after.

An annoyance is that after stripping  the filename is prefixed with * to indicate that it has been changed and needs to be changed, even when it has not (or should not have been). Closing brings up the unnecessary 'Changed, save?' box. Is this related to the comment?
Date User Action Args
2013-07-05 02:28:17terry.reedysetrecipients: + terry.reedy, Todd.Rovito, JayKrish, philwebster
2013-07-05 02:28:16terry.reedysetmessageid: <>
2013-07-05 02:28:16terry.reedylinkissue18279 messages
2013-07-05 02:28:16terry.reedycreate