Terry J. Reedy added the comment:

A subtle point about coverage. The target module must be imported.
from idlelib import SearchDialogBase as sdb  # works.
import idlelib.SearchDialogBase as sdb  # does not
at least not as I invoke coveragepy in my batch file.

With this change, the four uncovered lines were "btn.select()" after 
  if self.engine.is/re/case/word/back/():
in create_option_buttons and create_other_buttons. I added a parameter to 
checkboxtests and a new method test_create_option_buttons_flipped. That leaves 
the line after isback() and I think the radiobutton test probably covers that 
anyway.

The attached file has a few other cosmetic changes, like 'self.searchengine' to 
'self.engine'.

I would like to remove the duplicate testing in test_create_widgets. All we 
care for that test is that create_widgets calls the other four create methods. 
This could be done either by mocking the other methods (unittest.mock or custom 
replacement) or by looking to see that there is one entry, option button, other 
button, and command button.

Were you planning to do the check-label todos?

----------
Added file: http://bugs.python.org/file31364/18592_test_searchdialog.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18592>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to