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

Function default_choice

tests/commands/test_init_command.py:137–153  ·  view source on GitHub ↗
(request, mocker: MockFixture)

Source from the content-addressed store, hash-verified

135
136@pytest.fixture(params=["pyproject.toml", ".cz.json", ".cz.yaml"])
137def default_choice(request, mocker: MockFixture):
138 mocker.patch(
139 "questionary.select",
140 side_effect=[
141 FakeQuestion(request.param),
142 FakeQuestion("cz_conventional_commits"),
143 FakeQuestion("commitizen"),
144 FakeQuestion("semver"),
145 ],
146 )
147 mocker.patch("questionary.confirm", return_value=FakeQuestion(True))
148 mocker.patch("questionary.text", return_value=FakeQuestion("$version"))
149 mocker.patch(
150 "questionary.checkbox",
151 return_value=FakeQuestion(["commit-msg", "pre-push"]),
152 )
153 return request.param
154
155
156def check_cz_config(config_filepath: str):

Callers

nothing calls this directly

Calls 1

FakeQuestionClass · 0.85

Tested by

no test coverage detected