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

Function test_concat_extension_array

xarray/tests/test_concat.py:171–183  ·  view source on GitHub ↗
(var)

Source from the content-addressed store, hash-verified

169
170@pytest.mark.parametrize("var", ["var4", pytest.param("var5", marks=requires_pyarrow)])
171def test_concat_extension_array(var) -> None:
172 data1 = create_test_data(use_extension_array=True)
173 data2 = create_test_data(use_extension_array=True)
174 concatenated = concat([data1, data2], dim="dim1")
175 assert pd.Series(
176 concatenated[var]
177 == type(data2[var].variable.data)._concat_same_type(
178 [
179 data1[var].variable.data,
180 data2[var].variable.data,
181 ]
182 )
183 ).all() # need to wrap in series because pyarrow bool does not support `all`
184
185
186def test_concat_missing_multiple_consecutive_var() -> None:

Callers

nothing calls this directly

Calls 4

concatFunction · 0.90
create_test_dataFunction · 0.85
typeFunction · 0.85
allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…