MCPcopy Index your code
hub / github.com/pydata/xarray / test_create_with_data

Method test_create_with_data

xarray/tests/test_datatree.py:195–202  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

193
194class TestStoreDatasets:
195 def test_create_with_data(self) -> None:
196 dat = xr.Dataset({"a": 0})
197 john = DataTree(name="john", dataset=dat)
198
199 assert_identical(john.to_dataset(), dat)
200
201 with pytest.raises(TypeError):
202 DataTree(name="mary", dataset="junk") # type: ignore[arg-type]
203
204 def test_set_data(self) -> None:
205 john = DataTree(name="john")

Callers

nothing calls this directly

Calls 3

to_datasetMethod · 0.95
DataTreeClass · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected