mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #27477: Convert IDLE search dialogs to using ttk widgets.
This commit is contained in:
parent
a748032653
commit
6f7b0f577e
6 changed files with 50 additions and 36 deletions
|
@ -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': {},
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue