[issue18279] IDLE Unit test for RstripExtension.py

2013-07-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Trying it out, I rediscovered that patchcheck has a Windows bug. This time I reported it ;-) #18439. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18279

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset ec71fcdcfeac by Terry Jan Reedy in branch '2.7': Issue #18279: Add tests for idlelib/RstripExtension.py. Original patch by http://hg.python.org/cpython/rev/ec71fcdcfeac New changeset 22ce68d98345 by Terry Jan Reedy in branch '3.3': Issue #18279:

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: I had to remove the dependency to close this, since the test_text issue #18365 was reopened. -- stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: A simple change to RstripExtension.py fixed the marking of unchanged files as changed. I also removed a useless extra iteration. Having a test makes it possible to do things like this without breaking what already worked. -- dependencies: -Idle: mock

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Phil (and everyone else): PLEASE submit patches with 4 space indents and no tabs and no trailing spaces. Even if the code below runs in the CPython interpreter, self.undo = mockUndoDelegator() 8 spaces 4 spaces def get_selection_indices(self):

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-12 Thread Todd Rovito
Todd Rovito added the comment: As a suggestion I always use the command make patchcheck (before making the patch) which catches the white space and tab problem plus it fixes other things. Here is more information on patch check in the developer's guide.

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am aware of patchcheck, but the problem for me is that 'make patchcheck' does not work on Windows; the doc is wrong on the awkward to type Windows alternative; and it is usually useless anyway. But I agree that anyone who does not use a editor configured to

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-07 Thread Phil Webster
Phil Webster added the comment: This patch contains mock_idle.py and the rstrip test using the mock text widget from #18365. Terry- For some reason, the Text widget always contains a '\n' as the last character even when there is nothing visible. Doing a text.get('1.0','end') always has a

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I decided that the first commit should be a separate issue that this issue depends on. -- assignee: - terry.reedy dependencies: +Idle: mock Text class and test thereof ___ Python tracker rep...@bugs.python.org

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-04 Thread Phil Webster
Phil Webster added the comment: Added to Terry's Text Widget code (in #18226) and created mock_idle.py for the mock EditorWindow. Todd's FormatParagraph test in the aforementioned issue also passes with the mock EditorWindow. -- Added file:

[issue18279] IDLE Unit test for RstripExtension.py

2013-07-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I want to make two separate commits. First add mock Text into mock_tk.py, and add a new test_text.py. 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

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-24 Thread Phil Webster
Phil Webster added the comment: Modified the first patch to get rid of mock EditorWindow in favor of the real thing. Also renamed the test to 'test_rstrip'. -- Added file: http://bugs.python.org/file30694/test_rstrip.patch ___ Python tracker

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster
New submission from Phil Webster: This is a single test for RstripExtension.py, following from #15392. I also added a mock EditorWindow module with a Text widget for testing. test_rstripextension.py seems to run fine inside IDLE and produces the following output: test_do_rstrip

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster
Changes by Phil Webster webster.p...@gmail.com: -- nosy: +Todd.Rovito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18279 ___ ___ Python-bugs-list

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster
Changes by Phil Webster webster.p...@gmail.com: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18279 ___ ___ Python-bugs-list

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster
Changes by Phil Webster webster.p...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file30664/test_rstripext.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18279 ___

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: There is a separate issue about killing that warning. If you leave off '-ugui', you will see the traceback and why I said that requires('gui') should be wrapped for unittest discovery. As the code is, the call is executed when the file is imported, possibly

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster
Phil Webster added the comment: Thank you for the feedback Terry. I'm not seeing the traceback without '-ugui' either, so I'm going to look into that. I get the same results with requires('gui') moved inside of setUp, is that what you mean by wrapping? For mock_ewin I used a real Text widget