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

Method test_get_section_list

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

Source from the content-addressed store, hash-verified

338 self.assertEqual(conf.GetOption('main', 'Foo', 'bar'), 'newbar')
339
340 def test_get_section_list(self):
341 conf = self.mock_config()
342
343 self.assertCountEqual(
344 conf.GetSectionList('default', 'main'),
345 ['General', 'EditorWindow', 'PyShell', 'Indent', 'Theme',
346 'Keys', 'History', 'HelpFiles'])
347 self.assertCountEqual(
348 conf.GetSectionList('user', 'main'),
349 ['General', 'EditorWindow', 'PyShell', 'Indent', 'Theme',
350 'Keys', 'History', 'HelpFiles'])
351
352 with self.assertRaises(config.InvalidConfigSet):
353 conf.GetSectionList('foobar', 'main')
354 with self.assertRaises(config.InvalidConfigType):
355 conf.GetSectionList('default', 'notexists')
356
357 def test_get_highlight(self):
358 conf = self.mock_config()

Callers

nothing calls this directly

Calls 4

mock_configMethod · 0.95
assertCountEqualMethod · 0.80
GetSectionListMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected