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

Method add_section

Lib/configparser.py:1268–1273  ·  view source on GitHub ↗

Create a new section in the configuration. Extends RawConfigParser.add_section by validating if the section name is a string.

(self, section)

Source from the content-addressed store, hash-verified

1266 super().set(section, option, value)
1267
1268 def add_section(self, section):
1269 """Create a new section in the configuration. Extends
1270 RawConfigParser.add_section by validating if the section name is
1271 a string."""
1272 self._validate_value_types(section=section)
1273 super().add_section(section)
1274
1275 def _read_defaults(self, defaults):
1276 """Reads the defaults passed in the initializer, implicitly converting

Callers 15

test_add_sectionMethod · 0.95
test_delimiter_in_keyMethod · 0.95
test_case_sensitivityMethod · 0.45
test_query_errorsMethod · 0.45
test_weird_errorsMethod · 0.45
setUpMethod · 0.45
prepareMethod · 0.45
test_disabled_errorMethod · 0.45

Calls 2

superClass · 0.85
_validate_value_typesMethod · 0.80

Tested by 14

test_add_sectionMethod · 0.76
test_delimiter_in_keyMethod · 0.76
test_case_sensitivityMethod · 0.36
test_query_errorsMethod · 0.36
test_weird_errorsMethod · 0.36
setUpMethod · 0.36
prepareMethod · 0.36
test_disabled_errorMethod · 0.36