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

Function changelog_format

tests/conftest.py:299–310  ·  view source on GitHub ↗

For tests relying on formats specifics

(
    config: BaseConfig, request: pytest.FixtureRequest
)

Source from the content-addressed store, hash-verified

297
298@pytest.fixture(params=SUPPORTED_FORMATS)
299def changelog_format(
300 config: BaseConfig, request: pytest.FixtureRequest
301) -> ChangelogFormat:
302 """For tests relying on formats specifics"""
303 format: str = request.param
304 config.settings["changelog_format"] = format
305 if "tmp_commitizen_project" in request.fixturenames:
306 tmp_commitizen_project = request.getfixturevalue("tmp_commitizen_project")
307 pyproject = tmp_commitizen_project / "pyproject.toml"
308 with pyproject.open("a", encoding="utf-8") as f:
309 f.write(f'\nchangelog_format = "{format}"\n')
310 return get_changelog_format(config)
311
312
313@pytest.fixture

Callers

nothing calls this directly

Calls 1

get_changelog_formatFunction · 0.90

Tested by

no test coverage detected