summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/idle_test
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-07-11 00:21:31 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-07-11 00:21:31 (GMT)
commit6f7b0f577ea16df0b9bc3ee2a66fd668e83414eb (patch)
tree872fbd1843abbdbd257b310cf094d7c489e21ca2 /Lib/idlelib/idle_test
parenta748032653aec69596257f59f27d8e1945fece9d (diff)
downloadcpython-6f7b0f577ea16df0b9bc3ee2a66fd668e83414eb.zip
cpython-6f7b0f577ea16df0b9bc3ee2a66fd668e83414eb.tar.gz
cpython-6f7b0f577ea16df0b9bc3ee2a66fd668e83414eb.tar.bz2
Issue #27477: Convert IDLE search dialogs to using ttk widgets.
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r--Lib/idlelib/idle_test/htest.py7
-rw-r--r--Lib/idlelib/idle_test/test_searchbase.py13
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)