mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-43013: Fix old tkinter module names in idlelib (GH-24326)
Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and 'tkMessageBox' and remove 'tk'. Just lowercase 'tkFont' as 'font' is already used. Adjust import.
This commit is contained in:
parent
cf19cc3b92
commit
879986d8a9
13 changed files with 66 additions and 67 deletions
|
|
@ -396,7 +396,7 @@ class ExpandingButtonTest(unittest.TestCase):
|
|||
expandingbutton.base_text = expandingbutton.text
|
||||
|
||||
# Patch the message box module to always return False.
|
||||
with patch('idlelib.squeezer.tkMessageBox') as mock_msgbox:
|
||||
with patch('idlelib.squeezer.messagebox') as mock_msgbox:
|
||||
mock_msgbox.askokcancel.return_value = False
|
||||
mock_msgbox.askyesno.return_value = False
|
||||
# Trigger the expand event.
|
||||
|
|
@ -407,7 +407,7 @@ class ExpandingButtonTest(unittest.TestCase):
|
|||
self.assertEqual(expandingbutton.text.get('1.0', 'end-1c'), '')
|
||||
|
||||
# Patch the message box module to always return True.
|
||||
with patch('idlelib.squeezer.tkMessageBox') as mock_msgbox:
|
||||
with patch('idlelib.squeezer.messagebox') as mock_msgbox:
|
||||
mock_msgbox.askokcancel.return_value = True
|
||||
mock_msgbox.askyesno.return_value = True
|
||||
# Trigger the expand event.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue