Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71bdf5a

Browse files
authored
Merge pull request #16705 from meeseeksmachine/auto-backport-of-pr-16656-on-v3.2.x
Backport PR #16656 on branch v3.2.x (Make test_imagegrid_cbar_mode_edge less flaky.)
2 parents e72ed82 + 4547203 commit 71bdf5a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/mpl_toolkits/tests/test_axes_grid.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@
1212
# The original version of this test relied on mpl_toolkits's slightly different
1313
# colorbar implementation; moving to matplotlib's own colorbar implementation
1414
# caused the small image comparison error.
15-
@pytest.mark.parametrize("legacy_colorbar", [False, True])
16-
@image_comparison(['imagegrid_cbar_mode.png'],
15+
@image_comparison(['imagegrid_cbar_mode.png', 'imagegrid_cbar_mode.png'],
1716
remove_text=True, style='mpl20', tol=0.3)
18-
def test_imagegrid_cbar_mode_edge(legacy_colorbar):
17+
def test_imagegrid_cbar_mode_edge():
18+
# Note, we don't use @pytest.mark.parametrize, because in parallel this
19+
# might cause one process result to overwrite another's.
20+
for legacy_colorbar in [False, True]:
21+
_test_imagegrid_cbar_mode_edge(legacy_colorbar)
22+
23+
24+
def _test_imagegrid_cbar_mode_edge(legacy_colorbar):
1925
mpl.rcParams["mpl_toolkits.legacy_colorbar"] = legacy_colorbar
2026

2127
X, Y = np.meshgrid(np.linspace(0, 6, 30), np.linspace(0, 6, 30))

0 commit comments

Comments
 (0)