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

Method test_custom_ini

testing/test_findpaths.py:33–39  ·  view source on GitHub ↗

[pytest] section in any .ini file is read correctly

(self, tmp_path: Path)

Source from the content-addressed store, hash-verified

31 }
32
33 def test_custom_ini(self, tmp_path: Path) -> None:
34 """[pytest] section in any .ini file is read correctly"""
35 fn = tmp_path / "custom.ini"
36 fn.write_text("[pytest]\nx=1", encoding="utf-8")
37 assert load_config_dict_from_file(fn) == {
38 "x": ConfigValue("1", origin="file", mode="ini")
39 }
40
41 def test_custom_ini_without_section(self, tmp_path: Path) -> None:
42 """Custom .ini files without [pytest] section are not considered for configuration"""

Callers

nothing calls this directly

Calls 3

ConfigValueClass · 0.90
write_textMethod · 0.80

Tested by

no test coverage detected