(self)
| 3470 | original.rename_vars(names_dict_bad) |
| 3471 | |
| 3472 | def test_rename_dimension_coord(self) -> None: |
| 3473 | # rename a dimension corodinate to a non-dimension coordinate |
| 3474 | # should preserve index |
| 3475 | original = Dataset(coords={"x": ("x", [0, 1, 2])}) |
| 3476 | |
| 3477 | actual = original.rename_vars({"x": "x_new"}) |
| 3478 | assert "x_new" in actual.xindexes |
| 3479 | |
| 3480 | actual_2 = original.rename_dims({"x": "x_new"}) |
| 3481 | assert "x" in actual_2.xindexes |
| 3482 | |
| 3483 | def test_rename_dimension_coord_warnings(self) -> None: |
| 3484 | # create a dimension coordinate by renaming a dimension or coordinate |
nothing calls this directly
no test coverage detected