For tests relying on formats specifics
(
config: BaseConfig, request: pytest.FixtureRequest
)
| 297 | |
| 298 | @pytest.fixture(params=SUPPORTED_FORMATS) |
| 299 | def 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 |
nothing calls this directly
no test coverage detected