(self, tmp_path: Path)
| 54 | assert conflicts[0]["theirs"] == "line B" |
| 55 | |
| 56 | def test_resolve_ours(self, tmp_path: Path) -> None: |
| 57 | content = textwrap.dedent("""\ |
| 58 | \\section{Intro} |
| 59 | <<<<<<< HEAD |
| 60 | AI version |
| 61 | ======= |
| 62 | Human version |
| 63 | >>>>>>> remote |
| 64 | \\section{End} |
| 65 | """) |
| 66 | (tmp_path / "paper.tex").write_text(content) |
| 67 | resolver = ConflictResolver() |
| 68 | resolved = resolver.resolve(tmp_path, strategy="ours") |
| 69 | assert len(resolved) == 1 |
| 70 | text = (tmp_path / "paper.tex").read_text() |
| 71 | assert "AI version" in text |
| 72 | assert "Human version" not in text |
| 73 | assert "<<<<<<" not in text |
| 74 | |
| 75 | def test_resolve_theirs(self, tmp_path: Path) -> None: |
| 76 | content = textwrap.dedent("""\ |
nothing calls this directly
no test coverage detected