Skip to content
forked from pydata/xarray

Commit

Permalink
minimize test mods
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Dec 22, 2023
1 parent 94c1c1f commit 44e5a41
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions xarray/tests/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,9 +1475,10 @@ def test_groupby_restore_coord_dims(self):
("a", ("a", "y")),
("b", ("x", "b")),
]:
result = array.groupby(by, squeeze=False, restore_coord_dims=True).map(
lambda x: x.squeeze()
)["c"]
with pytest.warns(UserWarning, match="The `squeeze` kwarg"):
result = array.groupby(by, restore_coord_dims=True).map(
lambda x: x.squeeze()
)["c"]
assert result.dims == expected_dims

def test_groupby_first_and_last(self):
Expand Down Expand Up @@ -1585,7 +1586,7 @@ def test_groupby_bins_ellipsis(self):
da = xr.DataArray(np.ones((2, 3, 4)))
bins = [-1, 0, 1, 2]
with xr.set_options(use_flox=False):
actual = da.groupby_bins("dim_0", bins, squeeze=False).mean(...)
actual = da.groupby_bins("dim_0", bins).mean(...)
with xr.set_options(use_flox=True):
expected = da.groupby_bins("dim_0", bins).mean(...)
assert_allclose(actual, expected)
Expand Down

0 comments on commit 44e5a41

Please sign in to comment.