(self)
| 611 | assert_identical(expected, actual) |
| 612 | |
| 613 | def test_dataset_compute(self) -> None: |
| 614 | expected = create_test_data() |
| 615 | |
| 616 | with self.roundtrip(expected) as actual: |
| 617 | # Test Dataset.compute() |
| 618 | for k, v in actual.variables.items(): |
| 619 | # IndexVariables are eagerly cached |
| 620 | assert v._in_memory == (k in actual.dims) |
| 621 | |
| 622 | computed = actual.compute() |
| 623 | |
| 624 | for k, v in actual.variables.items(): |
| 625 | assert v._in_memory == (k in actual.dims) |
| 626 | for v in computed.variables.values(): |
| 627 | assert v._in_memory |
| 628 | |
| 629 | assert_identical(expected, actual) |
| 630 | assert_identical(expected, computed) |
| 631 | |
| 632 | def test_pickle(self) -> None: |
| 633 | expected = Dataset({"foo": ("x", [42])}) |
nothing calls this directly
no test coverage detected