Skip to content

Commit 51ed009

Browse files
authored
tests
1 parent eb7b0be commit 51ed009

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

Lib/idlelib/idle_test/htest.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@
264264
'file': 'replace',
265265
'kwds': {},
266266
'msg': "Click the 'Replace' button.\n"
267-
"Test various replace options in the 'Replace dialog'.\n"
268-
"Click [Close] or [X] to close the 'Replace Dialog'."
267+
"Test various replace options in the 'Replace dialog'."
269268
}
270269

271270
_scrolled_list_spec = {
@@ -281,15 +280,13 @@
281280
'file': 'search',
282281
'kwds': {},
283282
'msg': "Click the 'Search' button.\n"
284-
"Test various search options in the 'Search dialog'.\n"
285-
"Click [Close] or [X] to close the 'Search Dialog'."
283+
"Test various search options in the 'Search dialog'."
286284
}
287285

288286
_searchbase_spec = {
289287
'file': 'searchbase',
290288
'kwds': {},
291-
'msg': "Check the appearance of the base search dialog\n"
292-
"Its only action is to close."
289+
'msg': "Check the appearance of the base search dialog"
293290
}
294291

295292
show_idlehelp_spec = {

Lib/idlelib/idle_test/test_searchbase.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_make_entry(self):
8585
equal(int(egi['row']), 0)
8686
equal(int(egi['column']), 1)
8787
equal(int(egi['rowspan']), 1)
88-
equal(int(egi['columnspan']), 1)
88+
equal(int(egi['columnspan']), 2)
8989
equal(self.dialog.row, 1)
9090

9191
def test_create_entries(self):
@@ -148,12 +148,6 @@ def test_make_button(self):
148148
def test_create_command_buttons(self):
149149
self.dialog.frame = Frame(self.root)
150150
self.dialog.create_command_buttons()
151-
# Look for close button command in buttonframe
152-
closebuttoncommand = ''
153-
for child in self.dialog.buttonframe.winfo_children():
154-
if child['text'] == 'Close':
155-
closebuttoncommand = child['command']
156-
self.assertIn('close', closebuttoncommand)
157151

158152

159153
if __name__ == '__main__':

Lib/idlelib/replace.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ def find_it(self, event=None):
8686
"Handle the Find button."
8787
self.do_find(False)
8888

89-
def replace_it(self, event=None):
89+
def replace_it(self, event=None):
9090
"""Only used in test case
91-
92-
If the find is successful, then perform replace.
93-
"""
91+
92+
If the find is successful, then perform replace.
93+
"""
9494
if self.do_find(self.ok):
9595
self.do_replace()
9696

0 commit comments

Comments
 (0)