(self)
| 766 | # TODO: test that save_all calls usercfg Saves. |
| 767 | |
| 768 | def test_delete_section(self): |
| 769 | changes = self.load() |
| 770 | changes.delete_section('main', 'fake') # Test no exception. |
| 771 | self.assertEqual(changes, self.loaded) # Test nothing deleted. |
| 772 | for cfgtype, section in (('main', 'Msec'), ('keys', 'Ksec')): |
| 773 | testcfg[cfgtype].SetOption(section, 'name', 'value') |
| 774 | changes.delete_section(cfgtype, section) |
| 775 | with self.assertRaises(KeyError): |
| 776 | changes[cfgtype][section] # Test section gone from changes |
| 777 | testcfg[cfgtype][section] # and from mock userCfg. |
| 778 | # TODO test for save call. |
| 779 | |
| 780 | def test_clear(self): |
| 781 | changes = self.load() |
nothing calls this directly
no test coverage detected