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

Method test_center

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

Source from the content-addressed store, hash-verified

972 assert cmap_params["norm"] is None
973
974 def test_center(self) -> None:
975 cmap_params = _determine_cmap_params(self.data, center=0.5)
976 assert cmap_params["vmax"] - 0.5 == 0.5 - cmap_params["vmin"]
977 assert cmap_params["cmap"] == "RdBu_r"
978 assert cmap_params["extend"] == "neither"
979 assert cmap_params["levels"] is None
980 assert cmap_params["norm"] is None
981
982 def test_cmap_sequential_option(self) -> None:
983 with xr.set_options(cmap_sequential="magma"):

Callers

nothing calls this directly

Calls 1

_determine_cmap_paramsFunction · 0.90

Tested by

no test coverage detected