26
26
# For testing, record args in a list for comparison with expected.
27
27
changes = []
28
28
class TestDialog (ConfigDialog ):
29
- def AddChangedItem (self , * args ):
29
+ def add_changed_item (self , * args ):
30
30
changes .append (args )
31
31
32
32
def setUpModule ():
@@ -58,21 +58,21 @@ def test_font(self):
58
58
dfont = idleConf .GetFont (root , 'main' , 'EditorWindow' )
59
59
dsize = str (dfont [1 ])
60
60
dbold = dfont [2 ] == 'bold'
61
- configure .fontName .set ('Test Font' )
61
+ configure .font_name .set ('Test Font' )
62
62
expected = [
63
63
('main' , 'EditorWindow' , 'font' , 'Test Font' ),
64
64
('main' , 'EditorWindow' , 'font-size' , dsize ),
65
65
('main' , 'EditorWindow' , 'font-bold' , dbold )]
66
66
self .assertEqual (changes , expected )
67
67
changes .clear ()
68
- configure .fontSize .set (20 )
68
+ configure .font_size .set (20 )
69
69
expected = [
70
70
('main' , 'EditorWindow' , 'font' , 'Test Font' ),
71
71
('main' , 'EditorWindow' , 'font-size' , '20' ),
72
72
('main' , 'EditorWindow' , 'font-bold' , dbold )]
73
73
self .assertEqual (changes , expected )
74
74
changes .clear ()
75
- configure .fontBold .set (not dbold )
75
+ configure .font_bold .set (not dbold )
76
76
expected = [
77
77
('main' , 'EditorWindow' , 'font' , 'Test Font' ),
78
78
('main' , 'EditorWindow' , 'font-size' , '20' ),
@@ -82,7 +82,7 @@ def test_font(self):
82
82
#def test_sample(self): pass # TODO
83
83
84
84
def test_tabspace (self ):
85
- configure .spaceNum .set (6 )
85
+ configure .space_num .set (6 )
86
86
self .assertEqual (changes , [('main' , 'Indent' , 'num-spaces' , 6 )])
87
87
88
88
@@ -106,19 +106,19 @@ def setUp(self):
106
106
changes .clear ()
107
107
108
108
def test_startup (self ):
109
- configure .radioStartupEdit .invoke ()
109
+ configure .radio_startup_edit .invoke ()
110
110
self .assertEqual (changes ,
111
111
[('main' , 'General' , 'editor-on-startup' , 1 )])
112
112
113
113
def test_autosave (self ):
114
- configure .radioSaveAuto .invoke ()
114
+ configure .radio_save_auto .invoke ()
115
115
self .assertEqual (changes , [('main' , 'General' , 'autosave' , 1 )])
116
116
117
117
def test_editor_size (self ):
118
- configure .entryWinHeight .insert (0 , '1' )
118
+ configure .entry_win_height .insert (0 , '1' )
119
119
self .assertEqual (changes , [('main' , 'EditorWindow' , 'height' , '140' )])
120
120
changes .clear ()
121
- configure .entryWinWidth .insert (0 , '1' )
121
+ configure .entry_win_width .insert (0 , '1' )
122
122
self .assertEqual (changes , [('main' , 'EditorWindow' , 'width' , '180' )])
123
123
124
124
#def test_help_sources(self): pass # TODO
0 commit comments