mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-33906: Rename idlelib.windows as window (#7833)
Match Window on the main menu and remove last plural module name. Change imports, test, and attribute references to match new name.
This commit is contained in:
parent
87a927325e
commit
a361e89d5a
8 changed files with 24 additions and 22 deletions
|
@ -255,9 +255,9 @@ class IdleConfTest(unittest.TestCase):
|
|||
with self.assertRaises(FileNotFoundError):
|
||||
conf.GetUserCfgDir()
|
||||
|
||||
@unittest.skipIf(not sys.platform.startswith('win'), 'this is test for windows system')
|
||||
@unittest.skipIf(not sys.platform.startswith('win'), 'this is test for Windows system')
|
||||
def test_get_user_cfg_dir_windows(self):
|
||||
"Test to get user config directory under windows"
|
||||
"Test to get user config directory under Windows"
|
||||
conf = self.new_config(_utest=True)
|
||||
|
||||
# Check normal way should success
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"Test windows, coverage 47%."
|
||||
"Test window, coverage 47%."
|
||||
|
||||
from idlelib import windows
|
||||
from idlelib import window
|
||||
import unittest
|
||||
from test.support import requires
|
||||
from tkinter import Tk
|
||||
|
@ -9,7 +9,7 @@ from tkinter import Tk
|
|||
class WindowListTest(unittest.TestCase):
|
||||
|
||||
def test_init(self):
|
||||
wl = windows.WindowList()
|
||||
wl = window.WindowList()
|
||||
self.assertEqual(wl.dict, {})
|
||||
self.assertEqual(wl.callbacks, [])
|
||||
|
||||
|
@ -20,14 +20,14 @@ class ListedToplevelTest(unittest.TestCase):
|
|||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
windows.registry = set()
|
||||
window.registry = set()
|
||||
requires('gui')
|
||||
cls.root = Tk()
|
||||
cls.root.withdraw()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
windows.registry = windows.WindowList()
|
||||
window.registry = window.WindowList()
|
||||
cls.root.update_idletasks()
|
||||
## for id in cls.root.tk.call('after', 'info'):
|
||||
## cls.root.after_cancel(id) # Need for EditorWindow.
|
||||
|
@ -36,8 +36,8 @@ class ListedToplevelTest(unittest.TestCase):
|
|||
|
||||
def test_init(self):
|
||||
|
||||
win = windows.ListedToplevel(self.root)
|
||||
self.assertIn(win, windows.registry)
|
||||
win = window.ListedToplevel(self.root)
|
||||
self.assertIn(win, window.registry)
|
||||
self.assertEqual(win.focused_widget, win)
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue