(barerepo: Repository)
| 364 | |
| 365 | |
| 366 | def test_hunk_content(barerepo: Repository) -> None: |
| 367 | commit_a = barerepo[COMMIT_SHA1_1] |
| 368 | commit_b = barerepo[COMMIT_SHA1_2] |
| 369 | patch = commit_a.tree.diff_to_tree(commit_b.tree)[0] |
| 370 | assert patch is not None |
| 371 | hunk = patch.hunks[0] |
| 372 | lines = (f'{x.origin} {x.content}' for x in hunk.lines) |
| 373 | assert HUNK_EXPECTED == ''.join(lines) |
| 374 | for line in hunk.lines: |
| 375 | assert line.content == line.raw_content.decode() |
| 376 | |
| 377 | |
| 378 | def test_find_similar(barerepo: Repository) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…