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

Function pre_commit_installed

tests/commands/test_init_command.py:123–133  ·  view source on GitHub ↗
(mocker: MockFixture)

Source from the content-addressed store, hash-verified

121
122@pytest.fixture
123def pre_commit_installed(mocker: MockFixture):
124 # Assume only `pre-commit` is installed
125 mocker.patch(
126 "commitizen.project_info.available_hook_installers",
127 return_value=["pre-commit"],
128 )
129 # And installation success (i.e. no exception raised)
130 mocker.patch(
131 "commitizen.cmd.run",
132 return_value=cmd.Command("0.0.1", "", b"", b"", 0),
133 )
134
135
136@pytest.fixture(params=["pyproject.toml", ".cz.json", ".cz.yaml"])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected