(self)
| 355 | assert [path for path, _ in group_subtrees(first, second)] == [".", "b", "c"] |
| 356 | |
| 357 | def test_different_structure(self) -> None: |
| 358 | first: NamedNode = NamedNode(name="a", children={"b": NamedNode()}) |
| 359 | second: NamedNode = NamedNode(name="a", children={"c": NamedNode()}) |
| 360 | it = group_subtrees(first, second) |
| 361 | |
| 362 | path, (node1, node2) = next(it) |
| 363 | assert path == "." |
| 364 | assert node1.name == node2.name == "a" |
| 365 | |
| 366 | with pytest.raises( |
| 367 | ValueError, |
| 368 | match=re.escape(r"children at root node do not match: ['b'] vs ['c']"), |
| 369 | ): |
| 370 | next(it) |
| 371 | |
| 372 | |
| 373 | class TestAncestry: |
nothing calls this directly
no test coverage detected