Skip to content

Commit 9361976

Browse files
committed
bpo-27388: IDLE: Refactor configdialog to PEP8 names and add docstrings
1 parent 44401cd commit 9361976

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Lib/idlelib/idle_test/test_configdialog.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# For testing, record args in a list for comparison with expected.
2727
changes = []
2828
class TestDialog(ConfigDialog):
29-
def AddChangedItem(self, *args):
29+
def add_changed_item(self, *args):
3030
changes.append(args)
3131

3232
def setUpModule():
@@ -58,21 +58,21 @@ def test_font(self):
5858
dfont = idleConf.GetFont(root, 'main', 'EditorWindow')
5959
dsize = str(dfont[1])
6060
dbold = dfont[2] == 'bold'
61-
configure.fontName.set('Test Font')
61+
configure.font_name.set('Test Font')
6262
expected = [
6363
('main', 'EditorWindow', 'font', 'Test Font'),
6464
('main', 'EditorWindow', 'font-size', dsize),
6565
('main', 'EditorWindow', 'font-bold', dbold)]
6666
self.assertEqual(changes, expected)
6767
changes.clear()
68-
configure.fontSize.set(20)
68+
configure.font_size.set(20)
6969
expected = [
7070
('main', 'EditorWindow', 'font', 'Test Font'),
7171
('main', 'EditorWindow', 'font-size', '20'),
7272
('main', 'EditorWindow', 'font-bold', dbold)]
7373
self.assertEqual(changes, expected)
7474
changes.clear()
75-
configure.fontBold.set(not dbold)
75+
configure.font_bold.set(not dbold)
7676
expected = [
7777
('main', 'EditorWindow', 'font', 'Test Font'),
7878
('main', 'EditorWindow', 'font-size', '20'),
@@ -82,7 +82,7 @@ def test_font(self):
8282
#def test_sample(self): pass # TODO
8383

8484
def test_tabspace(self):
85-
configure.spaceNum.set(6)
85+
configure.space_num.set(6)
8686
self.assertEqual(changes, [('main', 'Indent', 'num-spaces', 6)])
8787

8888

@@ -106,19 +106,19 @@ def setUp(self):
106106
changes.clear()
107107

108108
def test_startup(self):
109-
configure.radioStartupEdit.invoke()
109+
configure.radio_startup_edit.invoke()
110110
self.assertEqual(changes,
111111
[('main', 'General', 'editor-on-startup', 1)])
112112

113113
def test_autosave(self):
114-
configure.radioSaveAuto.invoke()
114+
configure.radio_save_auto.invoke()
115115
self.assertEqual(changes, [('main', 'General', 'autosave', 1)])
116116

117117
def test_editor_size(self):
118-
configure.entryWinHeight.insert(0, '1')
118+
configure.entry_win_height.insert(0, '1')
119119
self.assertEqual(changes, [('main', 'EditorWindow', 'height', '140')])
120120
changes.clear()
121-
configure.entryWinWidth.insert(0, '1')
121+
configure.entry_win_width.insert(0, '1')
122122
self.assertEqual(changes, [('main', 'EditorWindow', 'width', '180')])
123123

124124
#def test_help_sources(self): pass # TODO

0 commit comments

Comments
 (0)