MCPcopy
hub / github.com/pydata/xarray / test_slice_in_title_single_item_array

Method test_slice_in_title_single_item_array

xarray/tests/test_plot.py:830–835  ·  view source on GitHub ↗

Edge case for data of shape (1, N) or (N, 1).

(self)

Source from the content-addressed store, hash-verified

828 assert "d = 10.01" == title
829
830 def test_slice_in_title_single_item_array(self) -> None:
831 """Edge case for data of shape (1, N) or (N, 1)."""
832 darray = self.darray.expand_dims({"d": np.array([10.009])})
833 darray.plot.line(x="period")
834 title = plt.gca().get_title()
835 assert "d = [10.009]" == title
836
837 def test_warns_for_few_positional_args(self) -> None:
838 with pytest.warns(FutureWarning, match="Using positional arguments"):

Callers

nothing calls this directly

Calls 2

expand_dimsMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected