From f456138850a9e4c092cad46df7c0fb5586cf48d1 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 13 Mar 2020 15:44:39 -0400 Subject: [PATCH] Backport PR #16735: Make test_stem less flaky. --- lib/matplotlib/tests/test_axes.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 5edb4f24b44f..93548b2791ca 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -3227,10 +3227,15 @@ def test_hist_stacked_weighted(): ax.hist((d1, d2), weights=(w1, w2), histtype="stepfilled", stacked=True) -@pytest.mark.parametrize("use_line_collection", [True, False], - ids=['w/ line collection', 'w/o line collection']) -@image_comparison(['stem.png'], style='mpl20', remove_text=True) -def test_stem(use_line_collection): +@image_comparison(['stem.png', 'stem.png'], style='mpl20', remove_text=True) +def test_stem(): + # Note, we don't use @pytest.mark.parametrize, because in parallel this + # might cause one process result to overwrite another's. + for use_line_collection in [True, False]: + _test_stem(use_line_collection) + + +def _test_stem(use_line_collection): x = np.linspace(0.1, 2 * np.pi, 100) args = (x, np.cos(x)) # Label is a single space to force a legend to be drawn, but to avoid any 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