(self)
| 62 | DataTree(name="folder/data") |
| 63 | |
| 64 | def test_data_arg(self) -> None: |
| 65 | ds = xr.Dataset({"foo": 42}) |
| 66 | tree: DataTree = DataTree(dataset=ds) |
| 67 | assert_identical(tree.to_dataset(), ds) |
| 68 | |
| 69 | with pytest.raises(TypeError): |
| 70 | DataTree(dataset=xr.DataArray(42, name="foo")) # type: ignore[arg-type] |
| 71 | |
| 72 | def test_child_data_not_copied(self) -> None: |
| 73 | # regression test for https://github.com/pydata/xarray/issues/9683 |
nothing calls this directly
no test coverage detected