mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-27452: IDLE: Cleanup config.py code (GH-14577)
This commit is contained in:
parent
f69d5c6198
commit
f8d4cc7dbb
3 changed files with 10 additions and 39 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue