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

Function test_get_filenames_in_commit_error

tests/test_git.py:413–417  ·  view source on GitHub ↗

Test that GitCommandError is raised when git command fails.

(util: UtilFixture)

Source from the content-addressed store, hash-verified

411
412
413def test_get_filenames_in_commit_error(util: UtilFixture):
414 """Test that GitCommandError is raised when git command fails."""
415 util.mock_cmd(err="fatal: bad object HEAD", return_code=1)
416 with pytest.raises(GitCommandError, match="fatal: bad object HEAD"):
417 git.get_filenames_in_commit()
418
419
420@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

mock_cmdMethod · 0.80

Tested by

no test coverage detected