(self)
| 2396 | assert_identical(expected, actual) |
| 2397 | |
| 2398 | def test_reindex_attrs_encoding(self) -> None: |
| 2399 | ds = Dataset( |
| 2400 | {"data": ("x", [1, 2, 3])}, |
| 2401 | {"x": ("x", [0, 1, 2], {"foo": "bar"}, {"bar": "baz"})}, |
| 2402 | ) |
| 2403 | actual = ds.reindex(x=[0, 1]) |
| 2404 | expected = Dataset( |
| 2405 | {"data": ("x", [1, 2])}, |
| 2406 | {"x": ("x", [0, 1], {"foo": "bar"}, {"bar": "baz"})}, |
| 2407 | ) |
| 2408 | assert_identical(actual, expected) |
| 2409 | assert actual.x.encoding == expected.x.encoding |
| 2410 | |
| 2411 | def test_reindex_warning(self) -> None: |
| 2412 | data = create_test_data() |
nothing calls this directly
no test coverage detected