MCPcopy Create free account
hub / github.com/libgit2/pygit2 / test_blame_flags

Function test_blame_flags

test/test_blame.py:80–94  ·  view source on GitHub ↗
(blameflagsrepo: Repository)

Source from the content-addressed store, hash-verified

78
79
80def test_blame_flags(blameflagsrepo: Repository) -> None:
81 blame = blameflagsrepo.blame(PATH, flags=BlameFlag.IGNORE_WHITESPACE)
82
83 assert len(blame) == 3
84
85 for i, hunk in enumerate(blame):
86 assert hunk.lines_in_hunk == 1
87 assert HUNKS[i][0] == hunk.final_commit_id
88 assert HUNKS[i][1] == hunk.final_start_line_number
89 assert HUNKS[i][2] == hunk.final_committer
90 assert HUNKS[i][0] == hunk.orig_commit_id
91 assert hunk.orig_path == PATH
92 assert HUNKS[i][1] == hunk.orig_start_line_number
93 assert HUNKS[i][2] == hunk.orig_committer
94 assert HUNKS[i][3] == hunk.boundary
95
96
97def test_blame_with_invalid_index(testrepo: Repository) -> None:

Callers

nothing calls this directly

Calls 1

blameMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…