MCPcopy
hub / github.com/commitizen-tools/commitizen / run_cli

Method run_cli

tests/utils.py:103–107  ·  view source on GitHub ↗

Execute commitizen CLI with given args.

(self, *args: str)

Source from the content-addressed store, hash-verified

101 self.tick()
102
103 def run_cli(self, *args: str) -> None:
104 """Execute commitizen CLI with given args."""
105 self.mocker.patch.object(sys, "argv", ["cz", *args])
106 cli.main()
107 self.tick()
108
109 def patch_env(self) -> None:
110 """Patch environment variables to sync with FreezeGun time."""

Calls 1

tickMethod · 0.95

Tested by 15

test_no_argvFunction · 0.64
test_invalid_commandFunction · 0.64
test_nameFunction · 0.64
test_name_default_valueFunction · 0.64
test_lsFunction · 0.64
test_arg_debugFunction · 0.64
test_unknown_args_raisesFunction · 0.64