Skip to content

Commit

Permalink
Add unit test for facetting singleton dim
Browse files Browse the repository at this point in the history
  • Loading branch information
krokosik committed Sep 11, 2023
1 parent 35b02d7 commit 226ba51
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xarray/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,13 @@ def test_facetgrid_no_cbar_ax(self) -> None:
with pytest.raises(ValueError):
self.plotfunc(d, x="x", y="y", col="columns", row="rows", cbar_ax=1)

def test_multiplot_over_length_one_dim(self) -> None:
a = easy_array((1, 1, 1))
d = DataArray(a, dims=("col", "row", "hue"))
self.plotfunc(d, col="col")
self.plotfunc(d, row="row")
self.plotfunc(d, hue="hue")

def test_cmap_and_color_both(self) -> None:
with pytest.raises(ValueError):
self.plotmethod(colors="k", cmap="RdBu")
Expand Down

0 comments on commit 226ba51

Please sign in to comment.