[issue18489] IDLE Unit test for SearchEngine.py

2013-08-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: By masking mock Text.index with instance functions, I removed the need for tk.Text and hence the tests are gui free. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Pyth

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4179e2312089 by Terry Jan Reedy in branch '2.7': Issue #18489: Add complete, gui-free tests for idlelib.SearchEngine. http://hg.python.org/cpython/rev/4179e2312089 New changeset dfbf0f9034cc by Terry Jan Reedy in branch '3.3': Issue #18489: Add comp

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Adding engine.patvar.set(None) Equal(search(text), None) to test_search completed the coverage. -- ___ Python tracker ___ _

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The attached patch works on 3.3 and just need a small addition for 100$ coverage. After that, I intend to commit after porting to 2.7 (only two lines to change, I think) and testing it there. I split the search test case into three, one for each method. The te

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Big changes: monkey-patched module so tests of functions not using Text are non-gui; split search tests from other class tests as part of this. Several other little changes. The four lines still not covered are the bodies of if ok: start = last if wrapped and

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: As with searchdialogbase tests, I get the following in the console every time I run the test file within idle. ''' can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6)

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-18 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file31369/18489-test_searchengine4.diff ___ Python tracker ___ ___ Python-bugs-

[issue18489] IDLE Unit test for SearchEngine.py

2013-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 310d187020e3 by Terry Jan Reedy in branch '2.7': Issue #18489: idlelib.SearchEngine - add docstrings http://hg.python.org/cpython/rev/310d187020e3 New changeset cfb510884a13 by Terry Jan Reedy in branch '3.3': Issue #18489: idlelib.SearchEngine - ad

[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 file: http

[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 in #18226. -- comp