()
| 3445 | |
| 3446 | @requires_matplotlib |
| 3447 | def test_assert_valid_xy() -> None: |
| 3448 | ds = xr.tutorial.scatter_example_dataset() |
| 3449 | darray = ds.A |
| 3450 | |
| 3451 | # x is valid and should not error: |
| 3452 | _assert_valid_xy(darray=darray, xy="x", name="x") |
| 3453 | |
| 3454 | # None should be valid as well even though it isn't in the valid list: |
| 3455 | _assert_valid_xy(darray=darray, xy=None, name="x") |
| 3456 | |
| 3457 | # A hashable that is not valid should error: |
| 3458 | with pytest.raises(ValueError, match="x must be one of"): |
| 3459 | _assert_valid_xy(darray=darray, xy="error_now", name="x") |
| 3460 | |
| 3461 | |
| 3462 | @requires_matplotlib |
nothing calls this directly
no test coverage detected
searching dependent graphs…