From f97cff0b7a98ac667e69154c502851d37b1bd29e Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 30 Jul 2025 12:26:46 -0400 Subject: [PATCH 1/2] BLD: ignore more meson files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1d30ba69aeaa..9389a1612b14 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ pip-wheel-metadata/* .tox # build subproject files subprojects/*/ +subprojects/.* !subprojects/packagefiles/ # OS generated files # From 14950157c453cd421653f9892c707fc05978e898 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 30 Jul 2025 12:30:16 -0400 Subject: [PATCH 2/2] TST: only retry flaky tests on CI --- lib/matplotlib/tests/test_backends_interactive.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py index 9f8522a9df4a..9725a79397bc 100644 --- a/lib/matplotlib/tests/test_backends_interactive.py +++ b/lib/matplotlib/tests/test_backends_interactive.py @@ -127,6 +127,7 @@ def _get_testable_interactive_backends(): # Reasonable safe values for slower CI/Remote and local architectures. _test_timeout = 120 if is_ci_environment() else 20 +_retry_count = 3 if is_ci_environment() else 0 def _test_toolbar_button_la_mode_icon(fig): @@ -237,7 +238,7 @@ def check_alt_backend(alt_backend): @pytest.mark.parametrize("env", _get_testable_interactive_backends()) @pytest.mark.parametrize("toolbar", ["toolbar2", "toolmanager"]) -@pytest.mark.flaky(reruns=3) +@pytest.mark.flaky(reruns=_retry_count) def test_interactive_backend(env, toolbar): if env["MPLBACKEND"] == "macosx": if toolbar == "toolmanager": @@ -329,7 +330,7 @@ def _test_thread_impl(): @pytest.mark.parametrize("env", _thread_safe_backends) -@pytest.mark.flaky(reruns=3) +@pytest.mark.flaky(reruns=_retry_count) def test_interactive_thread_safety(env): proc = _run_helper(_test_thread_impl, timeout=_test_timeout, extra_env=env) assert proc.stdout.count("CloseEvent") == 1 @@ -617,7 +618,7 @@ def _test_number_of_draws_script(): @pytest.mark.parametrize("env", _blit_backends) # subprocesses can struggle to get the display, so rerun a few times -@pytest.mark.flaky(reruns=4) +@pytest.mark.flaky(reruns=_retry_count) def test_blitting_events(env): proc = _run_helper( _test_number_of_draws_script, timeout=_test_timeout, extra_env=env)