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

Method test_concat_twice

xarray/tests/test_combine.py:353–373  ·  view source on GitHub ↗
(self, create_combined_ids, concat_dim, kwargs)

Source from the content-addressed store, hash-verified

351 "concat_dim, kwargs", [("dim1", {}), ("new_dim", {"data_vars": "all"})]
352 )
353 def test_concat_twice(self, create_combined_ids, concat_dim, kwargs):
354 shape = (2, 3)
355 combined_ids = create_combined_ids(shape)
356 result = _combine_nd(
357 combined_ids,
358 concat_dims=["dim1", concat_dim],
359 data_vars="all",
360 coords="different",
361 compat="no_conflicts",
362 fill_value=dtypes.NA,
363 join="outer",
364 combine_attrs="drop",
365 )
366
367 ds = create_test_data
368 partway1 = concat([ds(0), ds(3)], dim="dim1")
369 partway2 = concat([ds(1), ds(4)], dim="dim1")
370 partway3 = concat([ds(2), ds(5)], dim="dim1")
371 expected = concat([partway1, partway2, partway3], **kwargs, dim=concat_dim)
372
373 assert_equal(result, expected)
374
375
376class TestCheckShapeTileIDs:

Callers

nothing calls this directly

Calls 5

_combine_ndFunction · 0.90
concatFunction · 0.90
assert_equalFunction · 0.90
create_combined_idsFunction · 0.85
dsFunction · 0.70

Tested by

no test coverage detected