(self)
| 2115 | assert 0 <= arr.min() <= arr.max() <= 1 |
| 2116 | |
| 2117 | def test_normalize_rgb_one_arg_error(self) -> None: |
| 2118 | da = DataArray(easy_array((5, 5, 3), start=-0.6, stop=1.4)) |
| 2119 | # If passed one bound that implies all out of range, error: |
| 2120 | for vmin, vmax in ((None, -1), (2, None)): |
| 2121 | with pytest.raises(ValueError): |
| 2122 | da.plot.imshow(vmin=vmin, vmax=vmax) |
| 2123 | # If passed two that's just moving the range, *not* an error: |
| 2124 | for vmin2, vmax2 in ((-1.2, -1), (2, 2.1)): |
| 2125 | da.plot.imshow(vmin=vmin2, vmax=vmax2) |
| 2126 | |
| 2127 | @pytest.mark.parametrize("dtype", [np.uint8, np.int8, np.int16]) |
| 2128 | def test_imshow_rgb_values_in_valid_range(self, dtype) -> None: |
nothing calls this directly
no test coverage detected