From 45472039bfb90b10a24287defe568e4e0494262f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 7 Mar 2020 01:02:39 -0500 Subject: [PATCH] Backport PR #16656: Make test_imagegrid_cbar_mode_edge less flaky. --- lib/mpl_toolkits/tests/test_axes_grid.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/mpl_toolkits/tests/test_axes_grid.py b/lib/mpl_toolkits/tests/test_axes_grid.py index 58358b686651..0ff4f2b013b6 100644 --- a/lib/mpl_toolkits/tests/test_axes_grid.py +++ b/lib/mpl_toolkits/tests/test_axes_grid.py @@ -12,10 +12,16 @@ # The original version of this test relied on mpl_toolkits's slightly different # colorbar implementation; moving to matplotlib's own colorbar implementation # caused the small image comparison error. -@pytest.mark.parametrize("legacy_colorbar", [False, True]) -@image_comparison(['imagegrid_cbar_mode.png'], +@image_comparison(['imagegrid_cbar_mode.png', 'imagegrid_cbar_mode.png'], remove_text=True, style='mpl20', tol=0.3) -def test_imagegrid_cbar_mode_edge(legacy_colorbar): +def test_imagegrid_cbar_mode_edge(): + # Note, we don't use @pytest.mark.parametrize, because in parallel this + # might cause one process result to overwrite another's. + for legacy_colorbar in [False, True]: + _test_imagegrid_cbar_mode_edge(legacy_colorbar) + + +def _test_imagegrid_cbar_mode_edge(legacy_colorbar): mpl.rcParams["mpl_toolkits.legacy_colorbar"] = legacy_colorbar X, Y = np.meshgrid(np.linspace(0, 6, 30), np.linspace(0, 6, 30)) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy