()
| 3275 | |
| 3276 | @requires_matplotlib |
| 3277 | def test_get_axis_raises() -> None: |
| 3278 | # test get_axis raises an error if trying to do invalid things |
| 3279 | |
| 3280 | # cannot provide both ax and figsize |
| 3281 | with pytest.raises(ValueError, match="both `figsize` and `ax`"): |
| 3282 | get_axis(figsize=[4, 4], size=None, aspect=None, ax="something") # type: ignore[arg-type] |
| 3283 | |
| 3284 | # cannot provide both ax and size |
| 3285 | with pytest.raises(ValueError, match="both `size` and `ax`"): |
| 3286 | get_axis(figsize=None, size=200, aspect=4 / 3, ax="something") # type: ignore[arg-type] |
| 3287 | |
| 3288 | # cannot provide both size and figsize |
| 3289 | with pytest.raises(ValueError, match="both `figsize` and `size`"): |
| 3290 | get_axis(figsize=[4, 4], size=200, aspect=None, ax=None) |
| 3291 | |
| 3292 | # cannot provide aspect and size |
| 3293 | with pytest.raises(ValueError, match="`aspect` argument without `size`"): |
| 3294 | get_axis(figsize=None, size=None, aspect=4 / 3, ax=None) |
| 3295 | |
| 3296 | # cannot provide axis and subplot_kws |
| 3297 | with pytest.raises(ValueError, match="cannot use subplot_kws with existing ax"): |
| 3298 | get_axis(figsize=None, size=None, aspect=None, ax=1, something_else=5) # type: ignore[arg-type] |
| 3299 | |
| 3300 | |
| 3301 | @requires_matplotlib |
nothing calls this directly
no test coverage detected
searching dependent graphs…