diff options
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r-- | Lib/idlelib/idle_test/htest.py | 7 | ||||
-rw-r--r-- | Lib/idlelib/idle_test/test_searchbase.py | 13 |
2 files changed, 8 insertions, 12 deletions
diff --git a/Lib/idlelib/idle_test/htest.py b/Lib/idlelib/idle_test/htest.py index f5311e9..4d98924 100644 --- a/Lib/idlelib/idle_test/htest.py +++ b/Lib/idlelib/idle_test/htest.py @@ -265,6 +265,13 @@ _search_dialog_spec = { "Click [Close] or [X] to close the 'Search Dialog'." } +_searchbase_spec = { + 'file': 'searchbase', + 'kwds': {}, + 'msg': "Check the appearance of the base search dialog\n" + "Its only action is to close." + } + _scrolled_list_spec = { 'file': 'scrolledlist', 'kwds': {}, diff --git a/Lib/idlelib/idle_test/test_searchbase.py b/Lib/idlelib/idle_test/test_searchbase.py index a0b1231..d769fa2 100644 --- a/Lib/idlelib/idle_test/test_searchbase.py +++ b/Lib/idlelib/idle_test/test_searchbase.py @@ -1,8 +1,7 @@ -'''Unittests for idlelib/searchbase.py +'''tests idlelib.searchbase. Coverage: 99%. The only thing not covered is inconsequential -- testing skipping of suite when self.needwrapbutton is false. - ''' import unittest from test.support import requires @@ -120,11 +119,6 @@ class SearchDialogBaseTest(unittest.TestCase): var, label = spec self.assertEqual(button['text'], label) self.assertEqual(var.get(), state) - if state == 1: - button.deselect() - else: - button.select() - self.assertEqual(var.get(), 1 - state) def test_create_other_buttons(self): for state in (False, True): @@ -140,10 +134,6 @@ class SearchDialogBaseTest(unittest.TestCase): # hit other button, then this one # indexes depend on button order self.assertEqual(var.get(), state) - buttons[val].select() - self.assertEqual(var.get(), 1 - state) - buttons[1-val].select() - self.assertEqual(var.get(), state) def test_make_button(self): self.dialog.top = self.root @@ -162,6 +152,5 @@ class SearchDialogBaseTest(unittest.TestCase): self.assertIn('close', closebuttoncommand) - if __name__ == '__main__': unittest.main(verbosity=2, exit=2) |