]> granicus.if.org Git - python/commitdiff
IDLE - Capitalize search dialogs' 'Close' button label. (#13691)
authorTerry Jan Reedy <tjreedy@udel.edu>
Fri, 31 May 2019 08:26:35 +0000 (04:26 -0400)
committerGitHub <noreply@github.com>
Fri, 31 May 2019 08:26:35 +0000 (04:26 -0400)
It seems to be the only widget label not capitalized.

Lib/idlelib/idle_test/test_searchbase.py
Lib/idlelib/searchbase.py

index 09a7fff51de1dc5bcbe0d8b65649bb7ceb584065..6dd4d79337371d7ac3b03034eccdccdc5120fd21 100644 (file)
@@ -32,6 +32,7 @@ class SearchDialogBaseTest(unittest.TestCase):
 
     @classmethod
     def tearDownClass(cls):
+        cls.root.update_idletasks()
         cls.root.destroy()
         del cls.root
 
@@ -149,7 +150,7 @@ class SearchDialogBaseTest(unittest.TestCase):
         # Look for close button command in buttonframe
         closebuttoncommand = ''
         for child in self.dialog.buttonframe.winfo_children():
-            if child['text'] == 'close':
+            if child['text'] == 'Close':
                 closebuttoncommand = child['command']
         self.assertIn('close', closebuttoncommand)
 
index f0e3d6f14ba49b75243faa28b09a30c3d370e5d7..74ba8538512b9d3ccb989915078dd6dfc231fe02 100644 (file)
@@ -172,7 +172,7 @@ class SearchDialogBase:
         f = self.buttonframe = Frame(self.top)
         f.grid(row=0,column=2,padx=2,pady=2,ipadx=2,ipady=2)
 
-        b = self.make_button("close", self.close)
+        b = self.make_button("Close", self.close)
         b.lower()