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

Function test_run

tests/test_bump_hooks.py:11–25  ·  view source on GitHub ↗
(mocker: MockFixture)

Source from the content-addressed store, hash-verified

9
10
11def test_run(mocker: MockFixture):
12 bump_hooks = ["pre_bump_hook", "pre_bump_hook_1"]
13
14 cmd_run_mock = mocker.Mock()
15 cmd_run_mock.return_value = 0
16 mocker.patch.object(cmd, "run_interactive", cmd_run_mock)
17
18 hooks.run(bump_hooks)
19
20 cmd_run_mock.assert_has_calls(
21 [
22 call("pre_bump_hook", env=dict(os.environ)),
23 call("pre_bump_hook_1", env=dict(os.environ)),
24 ]
25 )
26
27
28def test_run_error(mocker: MockFixture):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected