(testrepo: Repository)
| 255 | |
| 256 | |
| 257 | def test_patch_delete_blob(testrepo: Repository) -> None: |
| 258 | blob = testrepo[BLOB_OLD_SHA] |
| 259 | assert isinstance(blob, Blob) |
| 260 | patch = pygit2.Patch.create_from( |
| 261 | blob, |
| 262 | None, |
| 263 | old_as_path=BLOB_OLD_PATH, |
| 264 | new_as_path=BLOB_NEW_PATH, |
| 265 | ) |
| 266 | |
| 267 | # Make sure that even after deleting the blob the patch still has the |
| 268 | # necessary references to generate its patch |
| 269 | del blob |
| 270 | assert patch.text == BLOB_PATCH_DELETED |
| 271 | |
| 272 | |
| 273 | def test_patch_multi_blob(testrepo: Repository) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…