diff --git a/xarray/tests/test_groupby.py b/xarray/tests/test_groupby.py index 8d55ea9b517..35259094f54 100644 --- a/xarray/tests/test_groupby.py +++ b/xarray/tests/test_groupby.py @@ -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): @@ -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)