.
All checks were successful
Check / build (pull_request) Successful in 9m54s

This commit is contained in:
Andras Schmelczer 2026-10-27 15:31:31 +00:00
commit b4259b767c

View file

@ -27,6 +27,19 @@ class TestReconcile:
result = reconcile(parent, left, right)
assert result["text"] == "With reconcile, merging documents is easy!"
@pytest.mark.parametrize("parent", ["", "a"])
def test_replaying_conflicting_replacements(self, parent: str) -> None:
merged = reconcile(parent, "b", "x")
assert merged["text"] == "bx"
assert reconcile(parent, merged, "x") == merged
assert reconcile(parent, merged, "b") == merged
assert reconcile_with_history(parent, merged, "x")["text"] == "bx"
def test_replaying_preserves_repeated_text(self) -> None:
merged = reconcile("a", "bb", "x")
assert merged["text"] == "bbx"
assert reconcile("a", merged, "x") == merged
def test_with_cursors(self) -> None:
result = reconcile(
"Hello",