mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +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
|
@ -10,7 +10,7 @@ from unittest.mock import Mock
|
|||
from idlelib.idle_test.mock_tk import Mbox
|
||||
import idlelib.searchengine as se
|
||||
|
||||
orig_mbox = se.tkMessageBox
|
||||
orig_mbox = se.messagebox
|
||||
showerror = Mbox.showerror
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@ class ReplaceDialogTest(unittest.TestCase):
|
|||
def setUpClass(cls):
|
||||
cls.root = Tk()
|
||||
cls.root.withdraw()
|
||||
se.tkMessageBox = Mbox
|
||||
se.messagebox = Mbox
|
||||
cls.engine = se.SearchEngine(cls.root)
|
||||
cls.dialog = ReplaceDialog(cls.root, cls.engine)
|
||||
cls.dialog.bell = lambda: None
|
||||
|
@ -32,7 +32,7 @@ class ReplaceDialogTest(unittest.TestCase):
|
|||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
se.tkMessageBox = orig_mbox
|
||||
se.messagebox = orig_mbox
|
||||
del cls.text, cls.dialog, cls.engine
|
||||
cls.root.destroy()
|
||||
del cls.root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue