mirror of
https://github.com/unclebob/crapper.git
synced 2026-11-26 18:18:49 +00:00
Cover the mutation sites the suite never reached.
git status can fail after rev-parse succeeds, and that empty-stderr message was never executed. A non-numeric LCOV branch count never reaches the hit check, so the dead handler is gone and the record ignores it. JaCoCo's missing counter field and the Go report paths were split onto lines the coverage report records. A callback stored in a binding or passed to new stays inside its function, and an npm coverage script does not install Vitest. mutator --mutate-all on the changed Python files: 709 killed, 0 survived, 0 uncovered. Co-authored-by: Robert C. Martin <[email protected]>
This commit is contained in:
co-authored by
Robert C. Martin
parent
c0ba1e13ba
commit
8e491a636a
@@ -273,6 +273,16 @@ def test_changed_files_follow_git_status(tmp_path, monkeypatch, capsys):
|
||||
_changed_files(tmp_path)
|
||||
assert silent.value.code == 128
|
||||
|
||||
def status_fails(args, **kwargs):
|
||||
if "rev-parse" in args:
|
||||
return _Completed(0, f"{tmp_path.resolve()}\n")
|
||||
return _Completed(1, "", "")
|
||||
|
||||
monkeypatch.setattr("crapper.cli.subprocess.run", status_fails)
|
||||
with pytest.raises(GitError, match="git status failed") as status:
|
||||
_changed_files(tmp_path)
|
||||
assert status.value.code == 1
|
||||
|
||||
|
||||
def test_relative_paths_are_resolved_under_the_project_root(tmp_path):
|
||||
_write(tmp_path, "src/demo/core.clj", "(ns demo.core)\n\n(defn choose [x]\n (if x 1 0))\n")
|
||||
|
||||
Reference in New Issue
Block a user