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:
Terry Jan Reedy 2021-01-25 06:33:18 -05:00 committed by GitHub
parent cf19cc3b92
commit 879986d8a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 66 additions and 67 deletions

View file

@ -4,7 +4,7 @@ from idlelib import searchengine as se
import unittest
# from test.support import requires
from tkinter import BooleanVar, StringVar, TclError # ,Tk, Text
import tkinter.messagebox as tkMessageBox
from tkinter import messagebox
from idlelib.idle_test.mock_tk import Var, Mbox
from idlelib.idle_test.mock_tk import Text as mockText
import re
@ -19,13 +19,13 @@ def setUpModule():
# Replace s-e module tkinter imports other than non-gui TclError.
se.BooleanVar = Var
se.StringVar = Var
se.tkMessageBox = Mbox
se.messagebox = Mbox
def tearDownModule():
# Restore 'just in case', though other tests should also replace.
se.BooleanVar = BooleanVar
se.StringVar = StringVar
se.tkMessageBox = tkMessageBox
se.messagebox = messagebox
class Mock: