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

Method test_with_specific_inifile

testing/test_config.py:2022–2037  ·  view source on GitHub ↗
(
        self, tmp_path: Path, name: str, contents: str
    )

Source from the content-addressed store, hash-verified

2020 ],
2021 )
2022 def test_with_specific_inifile(
2023 self, tmp_path: Path, name: str, contents: str
2024 ) -> None:
2025 p = tmp_path / name
2026 p.touch()
2027 p.write_text(contents, encoding="utf-8")
2028 rootpath, inipath, ini_config, _ = determine_setup(
2029 inifile=str(p),
2030 override_ini=None,
2031 args=[str(tmp_path)],
2032 rootdir_cmd_arg=None,
2033 invocation_dir=Path.cwd(),
2034 )
2035 assert rootpath == tmp_path
2036 assert inipath == p
2037 assert ini_config["x"] == ConfigValue("10", origin="file", mode="ini")
2038
2039 def test_explicit_config_file_sets_rootdir(
2040 self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch

Callers

nothing calls this directly

Calls 3

determine_setupFunction · 0.90
ConfigValueClass · 0.90
write_textMethod · 0.80

Tested by

no test coverage detected