MCPcopy
hub / github.com/pydata/xarray / test_tree_method

Method test_tree_method

xarray/tests/test_datatree_mapping.py:144–152  ·  view source on GitHub ↗
(self, create_test_datatree)

Source from the content-addressed store, hash-verified

142 raise NotImplementedError
143
144 def test_tree_method(self, create_test_datatree):
145 dt = create_test_datatree()
146
147 def multiply(ds, times):
148 return times * ds
149
150 expected = create_test_datatree(modify=lambda ds: 10.0 * ds)
151 result_tree = dt.map_over_datasets(multiply, 10.0)
152 assert_equal(result_tree, expected)
153
154 def test_tree_method_with_kwarg(self, create_test_datatree):
155 dt = create_test_datatree()

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
create_test_datatreeFunction · 0.85
map_over_datasetsMethod · 0.80

Tested by

no test coverage detected