(mergerepo: Repository)
| 146 | |
| 147 | |
| 148 | def test_merge_remove_conflicts(mergerepo: Repository) -> None: |
| 149 | other_branch_tip = pygit2.Oid(hex='1b2bae55ac95a4be3f8983b86cd579226d0eb247') |
| 150 | mergerepo.merge(other_branch_tip) |
| 151 | idx = mergerepo.index |
| 152 | conflicts = idx.conflicts |
| 153 | assert conflicts is not None |
| 154 | assert '.gitignore' in conflicts |
| 155 | try: |
| 156 | conflicts['.gitignore'] |
| 157 | except KeyError: |
| 158 | mergerepo.fail("conflicts['.gitignore'] raised KeyError unexpectedly") # type: ignore |
| 159 | del idx.conflicts['.gitignore'] |
| 160 | with pytest.raises(KeyError): |
| 161 | conflicts.__getitem__('.gitignore') |
| 162 | assert '.gitignore' not in conflicts |
| 163 | assert idx.conflicts is None |
| 164 | |
| 165 | |
| 166 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…