()
| 147 | |
| 148 | @requires_scipy |
| 149 | def test_tree_index_equals() -> None: |
| 150 | xx1, yy1 = np.meshgrid([1.0, 2.0], [3.0, 4.0]) |
| 151 | ds1 = xr.Dataset( |
| 152 | coords={"xx": (("y", "x"), xx1), "yy": (("y", "x"), yy1)} |
| 153 | ).set_xindex(("xx", "yy"), NDPointIndex) |
| 154 | |
| 155 | xx2, yy2 = np.meshgrid([1.0, 2.0], [3.0, 4.0]) |
| 156 | ds2 = xr.Dataset( |
| 157 | coords={"xx": (("y", "x"), xx2), "yy": (("y", "x"), yy2)} |
| 158 | ).set_xindex(("xx", "yy"), NDPointIndex) |
| 159 | |
| 160 | xx3, yy3 = np.meshgrid([10.0, 20.0], [30.0, 40.0]) |
| 161 | ds3 = xr.Dataset( |
| 162 | coords={"xx": (("y", "x"), xx3), "yy": (("y", "x"), yy3)} |
| 163 | ).set_xindex(("xx", "yy"), NDPointIndex) |
| 164 | |
| 165 | assert ds1.xindexes["xx"].equals(ds2.xindexes["xx"]) |
| 166 | assert not ds1.xindexes["xx"].equals(ds3.xindexes["xx"]) |
| 167 | |
| 168 | |
| 169 | def test_tree_index_rename() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…