MCPcopy Index your code
hub / github.com/pydata/xarray / test_groupby_dataset_errors

Function test_groupby_dataset_errors

xarray/tests/test_groupby.py:891–898  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

889
890
891def test_groupby_dataset_errors() -> None:
892 data = create_test_data()
893 with pytest.raises(TypeError, match=r"`group` must be"):
894 data.groupby(np.arange(10)) # type: ignore[arg-type,unused-ignore]
895 with pytest.raises(ValueError, match=r"length does not match"):
896 data.groupby(data["dim1"][:3])
897 with pytest.raises(TypeError, match=r"`group` must be"):
898 data.groupby(data.coords["dim1"].to_index()) # type: ignore[arg-type]
899
900
901@pytest.mark.parametrize("use_flox", [True, False])

Callers

nothing calls this directly

Calls 4

create_test_dataFunction · 0.90
arangeMethod · 0.80
groupbyMethod · 0.45
to_indexMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…