Skip to content

Commit ba60210

Browse files
tacaswellQuLogic
authored andcommitted
CI: skip tk tests on GHA as well
1 parent 4e0b60c commit ba60210

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

lib/matplotlib/tests/test_backend_tk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def _isolated_tk_test(success_count, func=None):
3939
reason="$DISPLAY and $WAYLAND_DISPLAY are unset"
4040
)
4141
@pytest.mark.xfail( # https://github.com/actions/setup-python/issues/649
42-
'TF_BUILD' in os.environ and sys.platform == 'darwin' and
43-
sys.version_info[:2] < (3, 11),
42+
('TF_BUILD' in os.environ or 'GITHUB_ACTION' in os.environ) and
43+
sys.platform == 'darwin' and sys.version_info[:2] < (3, 11),
4444
reason='Tk version mismatch on Azure macOS CI'
4545
)
4646
@functools.wraps(func)

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ def _get_testable_interactive_backends():
6363
elif env["MPLBACKEND"].startswith('wx') and sys.platform == 'darwin':
6464
# ignore on OSX because that's currently broken (github #16849)
6565
marks.append(pytest.mark.xfail(reason='github #16849'))
66-
elif (env['MPLBACKEND'] == 'tkagg' and 'TF_BUILD' in os.environ and
67-
sys.platform == 'darwin' and sys.version_info[:2] < (3, 11)):
66+
elif (env['MPLBACKEND'] == 'tkagg' and
67+
('TF_BUILD' in os.environ or 'GITHUB_ACTION' in os.environ) and
68+
sys.platform == 'darwin' and
69+
sys.version_info[:2] < (3, 11)
70+
):
6871
marks.append( # https://github.com/actions/setup-python/issues/649
6972
pytest.mark.xfail(reason='Tk version mismatch on Azure macOS CI'))
7073
envs.append(
@@ -273,7 +276,8 @@ def _test_thread_impl():
273276
reason='PyPy does not support Tkinter threading: '
274277
'https://foss.heptapod.net/pypy/pypy/-/issues/1929',
275278
strict=True))
276-
elif (backend == 'tkagg' and 'TF_BUILD' in os.environ and
279+
elif (backend == 'tkagg' and
280+
('TF_BUILD' in os.environ or 'GITHUB_ACTION' in os.environ) and
277281
sys.platform == 'darwin' and sys.version_info[:2] < (3, 11)):
278282
param.marks.append( # https://github.com/actions/setup-python/issues/649
279283
pytest.mark.xfail('Tk version mismatch on Azure macOS CI'))
@@ -546,8 +550,11 @@ def _test_number_of_draws_script():
546550
elif backend == "wx":
547551
param.marks.append(
548552
pytest.mark.skip("wx does not support blitting"))
549-
elif (backend == 'tkagg' and 'TF_BUILD' in os.environ and
550-
sys.platform == 'darwin' and sys.version_info[:2] < (3, 11)):
553+
elif (backend == 'tkagg' and
554+
('TF_BUILD' in os.environ or 'GITHUB_ACTION' in os.environ) and
555+
sys.platform == 'darwin' and
556+
sys.version_info[:2] < (3, 11)
557+
):
551558
param.marks.append( # https://github.com/actions/setup-python/issues/649
552559
pytest.mark.xfail('Tk version mismatch on Azure macOS CI')
553560
)

0 commit comments

Comments
 (0)