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

Method test_cannot_change_mpl_aspect

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

Source from the content-addressed store, hash-verified

2030
2031 @pytest.mark.slow
2032 def test_cannot_change_mpl_aspect(self) -> None:
2033 with pytest.raises(ValueError, match=r"not available in xarray"):
2034 self.darray.plot.imshow(aspect="equal")
2035
2036 # with numbers we fall back to fig control
2037 self.darray.plot.imshow(size=5, aspect=2)
2038 assert "auto" == plt.gca().get_aspect()
2039 assert tuple(plt.gcf().get_size_inches()) == (10, 5)
2040
2041 @pytest.mark.slow
2042 def test_primitive_artist_returned(self) -> None:

Callers

nothing calls this directly

Calls 1

imshowMethod · 0.80

Tested by

no test coverage detected