@@ -188,6 +188,7 @@ def test_save_added(self):
188188 userkeys .remove_section ('Ksec' )
189189
190190 def test_save_help (self ):
191+ # Any change to HelpFiles overwrites entire section.
191192 changes = self .changes
192193 changes .save_option ('main' , 'HelpFiles' , 'IDLE' , 'idledoc' )
193194 changes .add_option ('main' , 'HelpFiles' , 'ELDI' , 'codeldi' )
@@ -207,10 +208,12 @@ def test_delete_section(self):
207208 changes .delete_section ('main' , 'fake' ) # Test no exception.
208209 self .assertEqual (changes , self .loaded ) # Test nothing deleted.
209210 for cfgtype , section in (('main' , 'Msec' ), ('keys' , 'Ksec' )):
211+ testcfg [cfgtype ].SetOption (section , 'name' , 'value' )
210212 changes .delete_section (cfgtype , section )
211213 with self .assertRaises (KeyError ):
212- changes [cfgtype ][section ] # Test section gone.
213- # TODO Test change to userkeys and maybe save call.
214+ changes [cfgtype ][section ] # Test section gone from changes
215+ testcfg [cfgtype ][section ] # and from mock userCfg.
216+ # TODO test for save call.
214217
215218 def test_clear (self ):
216219 changes = self .load ()
0 commit comments