@@ -127,6 +127,7 @@ def _get_testable_interactive_backends():
127
127
128
128
# Reasonable safe values for slower CI/Remote and local architectures.
129
129
_test_timeout = 120 if is_ci_environment () else 20
130
+ _retry_count = 3 if is_ci_environment () else 0
130
131
131
132
132
133
def _test_toolbar_button_la_mode_icon (fig ):
@@ -237,7 +238,7 @@ def check_alt_backend(alt_backend):
237
238
238
239
@pytest .mark .parametrize ("env" , _get_testable_interactive_backends ())
239
240
@pytest .mark .parametrize ("toolbar" , ["toolbar2" , "toolmanager" ])
240
- @pytest .mark .flaky (reruns = 3 )
241
+ @pytest .mark .flaky (reruns = _retry_count )
241
242
def test_interactive_backend (env , toolbar ):
242
243
if env ["MPLBACKEND" ] == "macosx" :
243
244
if toolbar == "toolmanager" :
@@ -329,7 +330,7 @@ def _test_thread_impl():
329
330
330
331
331
332
@pytest .mark .parametrize ("env" , _thread_safe_backends )
332
- @pytest .mark .flaky (reruns = 3 )
333
+ @pytest .mark .flaky (reruns = _retry_count )
333
334
def test_interactive_thread_safety (env ):
334
335
proc = _run_helper (_test_thread_impl , timeout = _test_timeout , extra_env = env )
335
336
assert proc .stdout .count ("CloseEvent" ) == 1
@@ -617,7 +618,7 @@ def _test_number_of_draws_script():
617
618
618
619
@pytest .mark .parametrize ("env" , _blit_backends )
619
620
# subprocesses can struggle to get the display, so rerun a few times
620
- @pytest .mark .flaky (reruns = 4 )
621
+ @pytest .mark .flaky (reruns = _retry_count )
621
622
def test_blitting_events (env ):
622
623
proc = _run_helper (
623
624
_test_number_of_draws_script , timeout = _test_timeout , extra_env = env )
0 commit comments