(barerepo: Repository)
| 394 | |
| 395 | |
| 396 | def test_diff_stats(barerepo: Repository) -> None: |
| 397 | commit_a = barerepo[COMMIT_SHA1_1] |
| 398 | commit_b = barerepo[COMMIT_SHA1_2] |
| 399 | |
| 400 | diff = commit_a.tree.diff_to_tree(commit_b.tree) |
| 401 | stats = diff.stats |
| 402 | assert 1 == stats.insertions |
| 403 | assert 2 == stats.deletions |
| 404 | assert 2 == stats.files_changed |
| 405 | formatted = stats.format( |
| 406 | format=DiffStatsFormat.FULL | DiffStatsFormat.INCLUDE_SUMMARY, width=80 |
| 407 | ) |
| 408 | assert STATS_EXPECTED == formatted |
| 409 | |
| 410 | |
| 411 | def test_deltas(barerepo: Repository) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…