Skip to content

Mnt/test qol improvements #30373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pip-wheel-metadata/*
.tox
# build subproject files
subprojects/*/
subprojects/.*
!subprojects/packagefiles/

# OS generated files #
Expand Down
7 changes: 4 additions & 3 deletions lib/matplotlib/tests/test_backends_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Loading