(self)
| 2363 | |
| 2364 | @pytest.mark.slow |
| 2365 | def test_robust(self) -> None: |
| 2366 | z = np.zeros((20, 20, 2)) |
| 2367 | darray = DataArray(z, dims=["y", "x", "z"]) |
| 2368 | darray[:, :, 1] = 1 |
| 2369 | darray[2, 0, 0] = -1000 |
| 2370 | darray[3, 0, 0] = 1000 |
| 2371 | g = xplt.FacetGrid(darray, col="z") |
| 2372 | g.map_dataarray(xplt.imshow, "x", "y", robust=True) |
| 2373 | |
| 2374 | # Color limits should be 0, 1 |
| 2375 | # The largest number displayed in the figure should be less than 21 |
| 2376 | numbers = set() |
| 2377 | alltxt = text_in_fig() |
| 2378 | for txt in alltxt: |
| 2379 | with contextlib.suppress(ValueError): |
| 2380 | numbers.add(float(txt)) |
| 2381 | largest = max(abs(x) for x in numbers) |
| 2382 | assert largest < 21 |
| 2383 | |
| 2384 | @pytest.mark.slow |
| 2385 | def test_can_set_vmin_vmax(self) -> None: |
nothing calls this directly
no test coverage detected