MCPcopy Index your code
hub / github.com/python/cpython / test_save_option

Method test_save_option

Lib/idlelib/idle_test/test_config.py:728–738  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

726 self.assertEqual(changes, self.loaded)
727
728 def test_save_option(self): # Static function does not touch changes.
729 save_option = self.changes.save_option
730 self.assertTrue(save_option('main', 'Indent', 'what', '0'))
731 self.assertFalse(save_option('main', 'Indent', 'what', '0'))
732 self.assertEqual(usermain['Indent']['what'], '0')
733
734 self.assertTrue(save_option('main', 'Indent', 'use-spaces', '0'))
735 self.assertEqual(usermain['Indent']['use-spaces'], '0')
736 self.assertTrue(save_option('main', 'Indent', 'use-spaces', '1'))
737 self.assertFalse(usermain.has_option('Indent', 'use-spaces'))
738 usermain.remove_section('Indent')
739
740 def test_save_added(self):
741 changes = self.load()

Callers

nothing calls this directly

Calls 5

assertTrueMethod · 0.80
assertFalseMethod · 0.80
remove_sectionMethod · 0.80
assertEqualMethod · 0.45
has_optionMethod · 0.45

Tested by

no test coverage detected