MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_valid_cfg_file

Method test_valid_cfg_file

testing/test_findpaths.py:42–46  ·  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

40 assert load_config_dict_from_file(fn) is None
41
42 def test_valid_cfg_file(self, tmp_path: Path) -> None:
43 """Custom .cfg files with [tool:pytest] section are read correctly"""
44 fn = tmp_path / "custom.cfg"
45 fn.write_text("[tool:pytest]\nx=1", encoding="utf-8")
46 assert load_config_dict_from_file(fn) == {"x": "1"}
47
48 def test_unsupported_pytest_section_in_cfg_file(self, tmp_path: Path) -> None:
49 """.cfg files with [pytest] section are no longer supported and should fail to alert users"""

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected