[issue21694] IDLE - Test ParenMatch

2014-06-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a64509b0bd5 by Terry Jan Reedy in branch '2.7': Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar. http://hg.python.org/cpython/rev/8a64509b0bd5 New changeset 385d4fea9f13 by Terry Jan Reedy in branch '3.4': Issue #21694: Add

[issue21694] IDLE - Test ParenMatch

2014-06-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: I changed the close to match what worked in test_hyperparser. At first, I still got the warning. To see if the remaining problem was the import of EditorWindow, I disabled that, and the message went away. When I re-enabled the import, it stayed away.

[issue21694] IDLE - Test ParenMatch

2014-06-14 Thread Tal Einat
Tal Einat added the comment: ParenMatch is indeed failing when the cursor is after the first parenthesis of the following code: (3 + 4 - 1) This happens both in Shell and Editor windows. I've traced the problem down to HyperParser. It doesn't properly support multi-line statements, as can

[issue21694] IDLE - Test ParenMatch

2014-06-14 Thread Tal Einat
Tal Einat added the comment: Progress: As a hack for exploring this issue, I fixed this in the Shell window by having ParenMatch instantiate HyperParser in such a way that it parses the entirety of the current input. In ParenMatch.flash_paren_event(), I added: from idlelib.PyShell import

[issue21694] IDLE - Test ParenMatch

2014-06-14 Thread Tal Einat
Tal Einat added the comment: I've opened a separate issue for the issue raised by Terry, #21756. Patch is included there. -- Added file: http://bugs.python.org/file35627/taleinat.20140614.IDLE_parenmatch_multiline_statement.patch ___ Python tracker

[issue21694] IDLE - Test ParenMatch

2014-06-14 Thread Tal Einat
Changes by Tal Einat talei...@gmail.com: Removed file: http://bugs.python.org/file35627/taleinat.20140614.IDLE_parenmatch_multiline_statement.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21694

[issue21694] IDLE - Test ParenMatch

2014-06-14 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com: Added file: http://bugs.python.org/file35629/test-hyperparser-v1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21694 ___

[issue21694] IDLE - Test ParenMatch

2014-06-14 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com: Removed file: http://bugs.python.org/file35629/test-hyperparser-v1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21694 ___

[issue21694] IDLE - Test ParenMatch

2014-06-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Attached is the 3.4 file I am ready to commit. Comments on Rietveld. I believe the 3 missed line could be hit by adding a delay to a test, but this seems pretty useless. The test file explicitly tests only two of the methods. Tests of other methods could be

[issue21694] IDLE - Test ParenMatch

2014-06-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: I did the trivial part of a 2.7 backport of 2 name changes, but the real problem is that 2.7 does not have unittest.mock (which is why I have not used it until now). I removed one use with a dummy class, but am leaving the other one in the last test to you.

[issue21694] IDLE - Test ParenMatch

2014-06-13 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21694 ___ ___

[issue21694] IDLE - Test ParenMatch

2014-06-13 Thread Tal Einat
Tal Einat added the comment: I can take a look at get_surrounding_brackets() if you like, since I've worked with that code before. -- nosy: +taleinat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21694

[issue21694] IDLE - Test ParenMatch

2014-06-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please do. #21686 is for hyperparser test, which is the next one I want to look at. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21694 ___

[issue21694] IDLE - Test ParenMatch

2014-06-13 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: Patch as per tracker and Rietveld comments for 2.7 Terry - I replaced the DummyFrame with a Mock, so that we can have consistent code across 2.7 and 3.4. I completed a docstring.(See Rietveld) -- Added file:

[issue21694] IDLE - Test ParenMatch

2014-06-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I just discovered what I consider to be a bug in parenmatch. Consider (3 + 4 - 1) When I type the closing paren or put the cursor on the second line and hit ^0, the highlight extends from ( to ), inclusive, as it should. If I put the cursor on the first

[issue21694] IDLE - Test ParenMatch

2014-06-08 Thread Saimadhav Heblikar
New submission from Saimadhav Heblikar: Adding test for idlelib.ParenMatch for 3.4 Will backport to 2.7 when this patch is OK. 3 lines could not be tested in this patch. -- components: IDLE files: test-parenmatch.diff keywords: patch messages: 220034 nosy: jesstess, sahutd, terry.reedy