(as_dataset: bool)
| 19 | |
| 20 | @pytest.mark.parametrize("as_dataset", (True, False)) |
| 21 | def test_weighted_non_DataArray_weights(as_dataset: bool) -> None: |
| 22 | data: DataArray | Dataset = DataArray([1, 2]) |
| 23 | if as_dataset: |
| 24 | data = data.to_dataset(name="data") |
| 25 | |
| 26 | with pytest.raises(ValueError, match=r"`weights` must be a DataArray"): |
| 27 | data.weighted([1, 2]) # type: ignore[arg-type] |
| 28 | |
| 29 | |
| 30 | @pytest.mark.parametrize("as_dataset", (True, False)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…