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

Method test_named_self

xarray/tests/test_datatree.py:1861–1872  ·  view source on GitHub ↗
(self, create_test_datatree: Callable[[], DataTree])

Source from the content-addressed store, hash-verified

1859 assert actual["arr_with_attrs"].attrs == attrs
1860
1861 def test_named_self(self, create_test_datatree: Callable[[], DataTree]) -> None:
1862 dt = create_test_datatree()
1863
1864 def f(x: int, tree: DataTree, y: int):
1865 tree.attrs.update({"x": x, "y": y})
1866 return tree
1867
1868 attrs = {"x": 1, "y": 2}
1869
1870 actual = dt.pipe((f, "tree"), **attrs)
1871
1872 assert actual is dt and actual.attrs == attrs
1873
1874
1875class TestIsomorphicEqualsAndIdentical:

Callers

nothing calls this directly

Calls 2

create_test_datatreeFunction · 0.85
pipeMethod · 0.45

Tested by

no test coverage detected