Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
gcaria committed Aug 22, 2021
1 parent 7240729 commit 5de44ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xarray/tests/test_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,15 @@ def test_concat_str_dtype(self, dtype, dim):

assert np.issubdtype(actual.x2.dtype, dtype)

def test_concat_coord_name(self):

da = DataArray([0], dims="a")
da_concat = concat([da, da], dim=DataArray([0, 1], dims="b"))
assert list(da_concat.coords) == ["b"]

da_concat_std = concat([da, da], dim=DataArray([0, 1]))
assert list(da_concat_std.coords) == ["dim_0"]


@pytest.mark.parametrize("attr1", ({"a": {"meta": [10, 20, 30]}}, {"a": [1, 2, 3]}, {}))
@pytest.mark.parametrize("attr2", ({"a": [1, 2, 3]}, {}))
Expand Down

0 comments on commit 5de44ba

Please sign in to comment.