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

Function edit_in_editor

tests/commands/test_commit_command.py:405–409  ·  view source on GitHub ↗
(argv: list[str])

Source from the content-addressed store, hash-verified

403 mocker.patch("shutil.which", return_value="vim")
404
405 def edit_in_editor(argv: list[str]) -> int:
406 message_file = Path(argv[1])
407 assert message_file.read_text(encoding=file_encoding) == message
408 message_file.write_text(edited_message, encoding=file_encoding)
409 return 0
410
411 mocker.patch("subprocess.call", side_effect=edit_in_editor)
412 commit_cmd = commands.Commit(config, {"edit": True})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected