Skip to content
forked from pydata/xarray

Commit 44e5a41

Browse files
committed
minimize test mods
1 parent 94c1c1f commit 44e5a41

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

xarray/tests/test_groupby.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1475,9 +1475,10 @@ def test_groupby_restore_coord_dims(self):
14751475
("a", ("a", "y")),
14761476
("b", ("x", "b")),
14771477
]:
1478-
result = array.groupby(by, squeeze=False, restore_coord_dims=True).map(
1479-
lambda x: x.squeeze()
1480-
)["c"]
1478+
with pytest.warns(UserWarning, match="The `squeeze` kwarg"):
1479+
result = array.groupby(by, restore_coord_dims=True).map(
1480+
lambda x: x.squeeze()
1481+
)["c"]
14811482
assert result.dims == expected_dims
14821483

14831484
def test_groupby_first_and_last(self):
@@ -1585,7 +1586,7 @@ def test_groupby_bins_ellipsis(self):
15851586
da = xr.DataArray(np.ones((2, 3, 4)))
15861587
bins = [-1, 0, 1, 2]
15871588
with xr.set_options(use_flox=False):
1588-
actual = da.groupby_bins("dim_0", bins, squeeze=False).mean(...)
1589+
actual = da.groupby_bins("dim_0", bins).mean(...)
15891590
with xr.set_options(use_flox=True):
15901591
expected = da.groupby_bins("dim_0", bins).mean(...)
15911592
assert_allclose(actual, expected)

0 commit comments

Comments
 (0)