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

Function test_map_blocks_change_name

xarray/tests/test_dask.py:1339–1349  ·  view source on GitHub ↗
(map_da)

Source from the content-addressed store, hash-verified

1337
1338
1339def test_map_blocks_change_name(map_da):
1340 def change_name(obj):
1341 obj = obj.copy(deep=True)
1342 obj.name = "new"
1343 return obj
1344
1345 expected = change_name(map_da)
1346 with raise_if_dask_computes():
1347 actual = xr.map_blocks(change_name, map_da)
1348
1349 assert_identical(actual, expected)
1350
1351
1352@pytest.mark.parametrize("obj", [make_da(), make_ds()])

Callers

nothing calls this directly

Calls 4

raise_if_dask_computesFunction · 0.90
assert_identicalFunction · 0.90
change_nameFunction · 0.85
map_blocksMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…