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

Method test_text_not_super_long

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

Source from the content-addressed store, hash-verified

2291
2292 @pytest.mark.slow
2293 def test_text_not_super_long(self) -> None:
2294 self.darray.coords["z"] = [100 * letter for letter in "abc"]
2295 g = xplt.FacetGrid(self.darray, col="z")
2296 g.map_dataarray(xplt.contour, "x", "y")
2297 alltxt = text_in_fig()
2298 maxlen = max(len(txt) for txt in alltxt)
2299 assert maxlen < 50
2300
2301 t0 = g.axs[0, 0].get_title()
2302 assert t0.endswith("...")
2303
2304 @pytest.mark.slow
2305 def test_colorbar(self) -> None:

Callers

nothing calls this directly

Calls 3

map_dataarrayMethod · 0.95
text_in_figFunction · 0.85
endswithMethod · 0.80

Tested by

no test coverage detected