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
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
___
Python
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
Terry J. Reedy added the comment:
Adding
engine.patvar.set(None)
Equal(search(text), None)
to test_search completed the coverage.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18489
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
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 ThemeChanged
(procedure ttk::ThemeChanged
Changes by Terry J. Reedy tjre...@udel.edu:
Added file: http://bugs.python.org/file31369/18489-test_searchengine4.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18489
___
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 -
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:
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.
--
10 matches
Mail list logo