Skip to content

Commit

Permalink
fix a broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
headtr1ck committed Jul 13, 2024
1 parent 602c3cf commit 07a52ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xarray/tests/test_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def test_concat_merge_variables_present_in_some_datasets(self, data) -> None:
assert_identical(expected, actual)

@pytest.mark.parametrize("data", [False], indirect=["data"])
def test_concat_2(self, data) -> None:
def test_concat_2(self, data: Dataset) -> None:
dim = "dim2"
datasets = [g.squeeze(dim) for _, g in data.groupby(dim, squeeze=False)]
concat_over = [k for k, v in data.coords.items() if dim in v.dims and k != dim]
Expand Down
3 changes: 2 additions & 1 deletion xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ def test_constructor_pandas_single(self) -> None:
pandas_obj = a.to_pandas()
ds_based_on_pandas = Dataset(pandas_obj) # type: ignore # TODO: improve typing of __init__
for dim in ds_based_on_pandas.data_vars:
assert_array_equal(ds_based_on_pandas[dim], pandas_obj[str(dim)])
assert isinstance(dim, int)
assert_array_equal(ds_based_on_pandas[dim], pandas_obj[dim])

def test_constructor_compat(self) -> None:
data = {"x": DataArray(0, coords={"y": 1}), "y": ("z", [1, 1, 1])}
Expand Down

0 comments on commit 07a52ae

Please sign in to comment.