MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / config_files_manager

Function config_files_manager

tests/test_conf.py:164–176  ·  view source on GitHub ↗
(request, tmp_path, monkeypatch)

Source from the content-addressed store, hash-verified

162
163@pytest.fixture
164def config_files_manager(request, tmp_path, monkeypatch):
165 monkeypatch.chdir(tmp_path)
166 filename = request.param
167 path = tmp_path / filename
168 path.parent.mkdir(parents=True, exist_ok=True)
169 with path.open("w", encoding="utf-8") as f:
170 if "toml" in filename:
171 f.write(PYPROJECT)
172 elif "json" in filename:
173 json.dump(DICT_CONFIG, f)
174 elif "yaml" in filename:
175 yaml.dump(DICT_CONFIG, f)
176 return
177
178
179@pytest.mark.usefixtures("in_repo_root")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected