Test line plot with intervals and a units attribute.
(self, dim)
| 732 | |
| 733 | @pytest.mark.parametrize("dim", ("x", "y")) |
| 734 | def test_labels_with_units_with_interval(self, dim) -> None: |
| 735 | """Test line plot with intervals and a units attribute.""" |
| 736 | bins = [-1, 0, 1, 2] |
| 737 | arr = self.darray.groupby_bins("dim_0", bins).mean(...) |
| 738 | arr.dim_0_bins.attrs["units"] = "m" |
| 739 | |
| 740 | (mappable,) = arr.plot(**{dim: "dim_0_bins"}) # type: ignore[arg-type] |
| 741 | ax = mappable.figure.gca() |
| 742 | actual = getattr(ax, f"get_{dim}label")() |
| 743 | |
| 744 | expected = "dim_0_bins_center [m]" |
| 745 | assert actual == expected |
| 746 | |
| 747 | def test_multiplot_over_length_one_dim(self) -> None: |
| 748 | a = easy_array((3, 1, 1, 1)) |
nothing calls this directly
no test coverage detected