[issue18910] IDLE: Unit test for textView.py

2013-09-02 Thread Phil Webster
New submission from Phil Webster: Started writing the tests for textView.py. -- components: IDLE files: test_textview.patch keywords: patch messages: 196820 nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy priority: normal severity: normal status: open title: IDLE: Unit test for

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-31 Thread Phil Webster
Phil Webster added the comment: Added tests for labels, a mock function for widget creation, a back option for radiobuttontests, and the docstring fixes that Terry mentioned. -- Added file: http://bugs.python.org/file31542/18592_test_searchdialog2.diff

[issue18409] IDLE Improvements: Unit test for AutoComplete.py

2013-08-26 Thread Phil Webster
Phil Webster added the comment: I've attached my work so far in order to get feedback before I head too far in the wrong direction. I'm not sure if my addition of mock events and AutoCompleteWindow is the right way to go and I'm open to any guidance. -- keywords: +p

[issue18766] IDLE: Autocomplete in editor doesn't work for un-imported modules

2013-08-16 Thread Phil Webster
New submission from Phil Webster: If you open a new editor window in IDLE, some modules will autocomplete (re, os, other common modules used by IDLE) and others will not (textwrap, datetime, ...). The current solution is to run your module or type the imports into the shell window to get

[issue18583] Idle: enhance FormatParagraph

2013-08-12 Thread Phil Webster
Phil Webster added the comment: I've attached a patch that attempts to address the issues above. For the tests, I made some changes because the cursor doesn't end in exactly the same spot with line endings. Here's a quick summary of the changes: 1. Removed format_paragraph and

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-10 Thread Phil Webster
Phil Webster added the comment: As suggested by Ezio, I factored out the button tests to a common method. -- Added file: http://bugs.python.org/file31220/test_searchdialogbase2.patch ___ Python tracker <http://bugs.python.org/issue18

[issue18583] Idle: enhance FormatParagraph

2013-08-09 Thread Phil Webster
Phil Webster added the comment: In the case of no selection would it make sense to only format if the cursor is in a string/comment? If not in a string or comment, the single line that the cursor is in could be formatted with a line ending backslash or not at all. Otherwise Format Paragraph

[issue18583] Idle: enhance FormatParagraph

2013-07-29 Thread Phil Webster
Changes by Phil Webster : -- nosy: +philwebster ___ Python tracker <http://bugs.python.org/issue18583> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-07-29 Thread Phil Webster
Changes by Phil Webster : -- keywords: +patch Added file: http://bugs.python.org/file31082/test_searchdialogbase.patch ___ Python tracker <http://bugs.python.org/issue18

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-07-29 Thread Phil Webster
New submission from Phil Webster: This is a basic set of tests for SearchDialogBase. It mainly consists of gui code, so I was not completely sure of how/what to test. Before venturing any further, I thought I would make sure I'm heading in the right direction. -- components:

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-24 Thread Phil Webster
Phil Webster added the comment: This patch moves the comment_header code to reformat_comment, adds tests for reformat_comment, and implements the fix that Todd mentioned in #18429. In addition, I changed the get_comment_header and get_indent regular expressions to only look for spaces and

[issue18489] IDLE Unit test for SearchEngine.py

2013-07-24 Thread Phil Webster
Phil Webster added the comment: Added tests for the rest of the SearchEngine module. I used the mock tkMessageBox for testing the error display, but used the tkinter Text widget for other tests because mark_set and tag_add/remove haven't been added to the mock yet. -- Added

[issue18504] IDLE:Improvements- Improving Mock_Text

2013-07-22 Thread Phil Webster
Changes by Phil Webster : -- nosy: +philwebster ___ Python tracker <http://bugs.python.org/issue18504> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-19 Thread Phil Webster
Phil Webster added the comment: I added and rewrote tests to use the Text widget (when necessary). The only changes made to FormatParagraph are documentation/comment formatting and the if __main__ function. I will work on the comment header behavior separately and can post the patch in this

[issue18489] IDLE Unit test for SearchEngine.py

2013-07-17 Thread Phil Webster
New submission from Phil Webster: This test uses the mock text widget to search forwards and backwards, with and without wrapping. It also tests for empty matches with the 'ok' flag set in search_text(). The patch relies on the mock text tag_add function implemented

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-17 Thread Phil Webster
Phil Webster added the comment: After reading Terry's comments on the initial patch I turned FormatParagraph's initial comments into a docstring and made sure that all lines were < 80 characters. -- Added file: http://bugs.python.org/file30960/18226IDLEUnitTestFormatPar

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-17 Thread Phil Webster
Phil Webster added the comment: Added tests for FormatParagraph using single/multiline comment blocks and single/multiline strings in the mock editor window. Here is a summary of the changes: FormatParagraph.py - description for format_paragraph_event - modified so that selecting a long

[issue18365] Idle: mock Text class and test thereof

2013-07-12 Thread Phil Webster
Phil Webster added the comment: Using tk.Text for more involved tests sounds good (at least as a start). The pass functions were used to get the FormatParagraph test (#18226) working. I've been using the same effbot.org site as a reference and haven't found anything mor

[issue18365] Idle: mock Text class and test thereof

2013-07-11 Thread Phil Webster
Phil Webster added the comment: Thanks Terry, I will start PEP8-checking my code before I submit (as well as testing more thoroughly). I was thinking the same thing about the logic behind _decode and index functions needing to be combined. How would you recommend adding functionality to the

[issue18425] IDLE Unit test for IdleHistory.py

2013-07-10 Thread Phil Webster
Changes by Phil Webster : -- nosy: +philwebster ___ Python tracker <http://bugs.python.org/issue18425> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18410] IDLE Improvements: Unit test for SearchDialog.py

2013-07-08 Thread Phil Webster
New submission from Phil Webster: Continuing the IDLE unittest framework from #15392. Depends on #18365. -- components: IDLE messages: 192713 nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy priority: normal severity: normal status: open title: IDLE Improvements: Unit test for

[issue18409] IDLE Improvements: Unit test for AutoComplete.py

2013-07-08 Thread Phil Webster
New submission from Phil Webster: I've started writing this test which depends on #18365. -- components: IDLE messages: 192711 nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy priority: normal severity: normal status: open title: IDLE Improvements: Unit test for AutoComple

[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',

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-07 Thread Phil Webster
Phil Webster added the comment: I made slight modifications to Todd's initial patch to test the mock Text widget from #18365. Thank you for the helpful feedback Terry! -- Added file: http://bugs.python.org/file30853/18226IDLEUnitTestFormatParagraph2.

[issue18365] Idle: mock Text class and test thereof

2013-07-07 Thread Phil Webster
Phil Webster added the comment: Added Text class to mock_tk.py and GUI/non-GUI tests in test_text.py. Running the IDLE tests produced no errors for me. -- keywords: +patch Added file: http://bugs.python.org/file30851/mock_text.patch ___ Python

[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: http://bugs.python.org

[issue18226] IDLE Unit test for FormatParagrah.py

2013-07-01 Thread Phil Webster
Phil Webster added the comment: I'm not sure if this is worth pursuing, but I made a mock Text Widget that behaves more like an actual Text Widget. I've attached my modified mock_tk.py which I used to create a mock editor window. This works for the test I made in #18279, but I am al

[issue18292] IDLE Improvements: Unit test for AutoExpand.py

2013-06-29 Thread Phil Webster
Changes by Phil Webster : -- nosy: +philwebster ___ Python tracker <http://bugs.python.org/issue18292> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 trac

[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_

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster
Changes by Phil Webster : -- keywords: +patch Added file: http://bugs.python.org/file30664/test_rstripext.patch ___ Python tracker <http://bugs.python.org/issue18

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster
Changes by Phil Webster : -- nosy: +Todd.Rovito ___ Python tracker <http://bugs.python.org/issue18279> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster
Changes by Phil Webster : -- nosy: +terry.reedy ___ Python tracker <http://bugs.python.org/issue18279> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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_

[issue18103] Create a GUI test framework for Idle

2013-06-17 Thread Phil Webster
Changes by Phil Webster : -- nosy: +philwebster ___ Python tracker <http://bugs.python.org/issue18103> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13657] IDLE doesn't support sys.ps1 and sys.ps2.

2013-05-17 Thread Phil Webster
Phil Webster added the comment: I've attached a patch that attempts to get sys.ps1 for the prompt. Unfortunately it prints out blue because it is treated as output from running print(sys.ps1) as if the user had typed it in. Now that I have a better understanding of the issue, I may be ab

[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2013-05-07 Thread Phil Webster
Phil Webster added the comment: After reading about beginners having difficulty with IDLE's terminal behavior, I wrote a (very) simple patch to disable left clicking in the text area. I realize that this doesn't solve the problem completely (and the fact that there is already a