MCPcopy
hub / github.com/pytest-dev/pytest / _parse_ini_config

Function _parse_ini_config

src/_pytest/config/findpaths.py:46–55  ·  view source on GitHub ↗

Parse the given generic '.ini' file using legacy IniConfig parser, returning the parsed object. Raise UsageError if the file cannot be parsed.

(path: Path)

Source from the content-addressed store, hash-verified

44
45
46def _parse_ini_config(path: Path) -> iniconfig.IniConfig:
47 """Parse the given generic '.ini' file using legacy IniConfig parser, returning
48 the parsed object.
49
50 Raise UsageError if the file cannot be parsed.
51 """
52 try:
53 return iniconfig.IniConfig(str(path))
54 except iniconfig.ParseError as exc:
55 raise UsageError(str(exc)) from exc
56
57
58def load_config_dict_from_file(

Callers 1

Calls 1

UsageErrorClass · 0.85

Tested by

no test coverage detected