MCPcopy Index your code
hub / github.com/pydata/xarray / test_default_labels

Method test_default_labels

xarray/tests/test_plot.py:2637–2653  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2635 assert lines[0].get_linestyle() == "--"
2636
2637 def test_default_labels(self) -> None:
2638 g = self.darray.plot(row="row", col="col", hue="hue") # type: ignore[call-arg]
2639 # Rightmost column should be labeled
2640 for label, ax in zip(
2641 self.darray.coords["row"].values, g.axs[:, -1], strict=True
2642 ):
2643 assert substring_in_axes(label, ax)
2644
2645 # Top row should be labeled
2646 for label, ax in zip(
2647 self.darray.coords["col"].values, g.axs[0, :], strict=True
2648 ):
2649 assert substring_in_axes(str(label), ax)
2650
2651 # Leftmost column should have array name
2652 for ax in g.axs[:, 0]:
2653 assert substring_in_axes(str(self.darray.name), ax)
2654
2655 def test_test_empty_cell(self) -> None:
2656 g = (

Callers

nothing calls this directly

Calls 2

substring_in_axesFunction · 0.85
plotMethod · 0.80

Tested by

no test coverage detected