bpo-27452: IDLE: Cleanup config.py code (GH-14577)

This commit is contained in:
Cheryl Sabella 2019-07-16 16:58:25 -04:00 committed by Terry Jan Reedy
parent f69d5c6198
commit f8d4cc7dbb
3 changed files with 10 additions and 39 deletions

View file

@ -159,19 +159,6 @@ class IdleUserConfParserTest(unittest.TestCase):
self.assertFalse(parser.IsEmpty())
self.assertCountEqual(parser.sections(), ['Foo'])
def test_remove_file(self):
with tempfile.TemporaryDirectory() as tdir:
path = os.path.join(tdir, 'test.cfg')
parser = self.new_parser(path)
parser.RemoveFile() # Should not raise exception.
parser.AddSection('Foo')
parser.SetOption('Foo', 'bar', 'true')
parser.Save()
self.assertTrue(os.path.exists(path))
parser.RemoveFile()
self.assertFalse(os.path.exists(path))
def test_save(self):
with tempfile.TemporaryDirectory() as tdir:
path = os.path.join(tdir, 'test.cfg')