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

Method test_multiple_configs

Lib/test/test_configparser.py:2239–2246  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2237 configparser.ConfigParser()[configparser.UNNAMED_SECTION] = {'a': '1'}
2238
2239 def test_multiple_configs(self):
2240 cfg = configparser.ConfigParser(allow_unnamed_section=True)
2241 cfg.read_string('a = 1')
2242 cfg.read_string('b = 2')
2243
2244 self.assertEqual([configparser.UNNAMED_SECTION], cfg.sections())
2245 self.assertEqual('1', cfg[configparser.UNNAMED_SECTION]['a'])
2246 self.assertEqual('2', cfg[configparser.UNNAMED_SECTION]['b'])
2247
2248
2249class InvalidInputTestCase(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

read_stringMethod · 0.80
assertEqualMethod · 0.45
sectionsMethod · 0.45

Tested by

no test coverage detected