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

Function test_get_core_editor

tests/test_git.py:326–336  ·  view source on GitHub ↗
(monkeypatch: pytest.MonkeyPatch, util: UtilFixture)

Source from the content-addressed store, hash-verified

324
325
326def test_get_core_editor(monkeypatch: pytest.MonkeyPatch, util: UtilFixture):
327 monkeypatch.setenv("GIT_EDITOR", "nano")
328 assert git.get_core_editor() == "nano"
329
330 monkeypatch.delenv("GIT_EDITOR")
331
332 util.mock_cmd(out="vim")
333 assert git.get_core_editor() == "vim"
334
335 util.mock_cmd()
336 assert git.get_core_editor() is None
337
338
339@pytest.mark.usefixtures("tmp_commitizen_project")

Callers

nothing calls this directly

Calls 1

mock_cmdMethod · 0.80

Tested by

no test coverage detected