(self)
| 4122 | assert_identical(expected, actual) |
| 4123 | |
| 4124 | def test_to_dataset_retains_keys(self) -> None: |
| 4125 | # use dates as convenient non-str objects. Not a specific date test |
| 4126 | import datetime |
| 4127 | |
| 4128 | dates = [datetime.date(2000, 1, d) for d in range(1, 4)] |
| 4129 | |
| 4130 | array = DataArray([1, 2, 3], coords=[("x", dates)], attrs={"a": 1}) |
| 4131 | |
| 4132 | # convert to dataset and back again |
| 4133 | result = array.to_dataset("x").to_dataarray(dim="x") |
| 4134 | |
| 4135 | assert_equal(array, result) |
| 4136 | |
| 4137 | def test_to_dataset_coord_value_is_dim(self) -> None: |
| 4138 | # github issue #7823 |
nothing calls this directly
no test coverage detected