()
| 108 | |
| 109 | |
| 110 | def test_path_equal() -> None: |
| 111 | # Root equals root |
| 112 | assert AccessPath.root() == AccessPath.root() |
| 113 | |
| 114 | # Root does not equal non-root paths |
| 115 | assert not (AccessPath.root() == AccessPath.root().attr("foo")) |
| 116 | |
| 117 | # Non-root does not equal root |
| 118 | assert not (AccessPath.root().attr("foo") == AccessPath.root()) |
| 119 | |
| 120 | # Path equals itself |
| 121 | assert AccessPath.root().attr("foo") == AccessPath.root().attr("foo") |
| 122 | |
| 123 | # Different attrs are not equal |
| 124 | assert not (AccessPath.root().attr("bar") == AccessPath.root().attr("foo")) |
| 125 | |
| 126 | # Shorter path does not equal longer path |
| 127 | assert not (AccessPath.root().attr("foo") == AccessPath.root().attr("foo").array_item(2)) |
| 128 | |
| 129 | # Longer path does not equal shorter path |
| 130 | assert not (AccessPath.root().attr("foo").array_item(2) == AccessPath.root().attr("foo")) |
| 131 | |
| 132 | # Different paths are not equal |
| 133 | assert not (AccessPath.root().attr("foo") == AccessPath.root().attr("bar").array_item(2)) |
nothing calls this directly
no test coverage detected