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

Method test_is_empty

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

Source from the content-addressed store, hash-verified

147 self.assertEqual(parser.sections(), ['Idle'])
148
149 def test_is_empty(self):
150 parser = self.new_parser()
151
152 parser.AddSection('Foo')
153 parser.AddSection('Bar')
154 self.assertTrue(parser.IsEmpty())
155 self.assertEqual(parser.sections(), [])
156
157 parser.SetOption('Foo', 'bar', 'false')
158 parser.AddSection('Bar')
159 self.assertFalse(parser.IsEmpty())
160 self.assertCountEqual(parser.sections(), ['Foo'])
161
162 def test_save(self):
163 with tempfile.TemporaryDirectory() as tdir:

Callers

nothing calls this directly

Calls 9

new_parserMethod · 0.95
AddSectionMethod · 0.80
assertTrueMethod · 0.80
IsEmptyMethod · 0.80
assertFalseMethod · 0.80
assertCountEqualMethod · 0.80
assertEqualMethod · 0.45
sectionsMethod · 0.45
SetOptionMethod · 0.45

Tested by

no test coverage detected