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

Method test_valid_cfg_file

testing/test_findpaths.py:53–59  ·  view source on GitHub ↗

Custom .cfg files with [tool:pytest] section are read correctly

(self, tmp_path: Path)

Source from the content-addressed store, hash-verified

51 assert load_config_dict_from_file(fn) is None
52
53 def test_valid_cfg_file(self, tmp_path: Path) -> None:
54 """Custom .cfg files with [tool:pytest] section are read correctly"""
55 fn = tmp_path / "custom.cfg"
56 fn.write_text("[tool:pytest]\nx=1", encoding="utf-8")
57 assert load_config_dict_from_file(fn) == {
58 "x": ConfigValue("1", origin="file", mode="ini")
59 }
60
61 def test_unsupported_pytest_section_in_cfg_file(self, tmp_path: Path) -> None:
62 """.cfg files with [pytest] section are no longer supported and should fail to alert users"""

Callers

nothing calls this directly

Calls 3

ConfigValueClass · 0.90
write_textMethod · 0.80

Tested by

no test coverage detected