8000 CI: Mark Tk tests on macOS Azure as xfail · devRD/matplotlib@b26ee6b · GitHub
[go: up one dir, main page]

Skip to content

Commit b26ee6b

Browse files
QuLogictimhoffmoscargus
authored andcommitted
CI: Mark Tk tests on macOS Azure as xfail
This is a re-application of matplotlib#23095, but with some more specific conditions. Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Co-authored-by: Oscar Gustafsson <oscar.gustafsson@gmail.com>
1 parent 3ae7ff4 commit b26ee6b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

lib/matplotlib/tests/test_backend_tk.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ def _isolated_tk_test(success_count, func=None):
3838
sys.platform == "linux" and not _c_internal_utils.display_is_valid(),
3939
reason="$DISPLAY and $WAYLAND_DISPLAY are unset"
4040
)
41+
@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, 10),
44+
reason='Tk version mismatch on Azure macOS CI'
45+
)
4146
@functools.wraps(func)
4247
def test_func():
4348
# even if the package exists, may not actually be importable this can

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ 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, 10)):
68+
marks.append( # https://github.com/actions/setup-python/issues/649
69+
pytest.mark.xfail(reason='Tk version mismatch on Azure macOS CI'))
6670
envs.append(
6771
pytest.param(
6872
{**env, 'BACKEND_DEPS': ','.join(deps)},
@@ -271,6 +275,10 @@ def _test_thread_impl():
271275
reason='PyPy does not support Tkinter threading: '
272276
'https://foss.heptapod.net/pypy/pypy/-/issues/1929',
273277
strict=True))
278+
elif (backend == 'tkagg' and 'TF_BUILD' in os.environ and
279+
sys.platform == 'darwin' and sys.version_info[:2] == (3, 10)):
280+
param.marks.append( # https://github.com/actions/setup-python/issues/649
281+
pytest.mark.xfail('Tk version mismatch on Azure macOS CI'))
274282

275283

276284
@pytest.mark.parametrize("env", _thread_safe_backends)
@@ -540,6 +548,11 @@ def _test_number_of_draws_script():
540548
elif backend == "wx":
541549
param.marks.append(
542550
pytest.mark.skip("wx does not support blitting"))
551+
elif (backend == 'tkagg' and 'TF_BUILD' in os.environ and
552+
sys.platform == 'darwin' and sys.version_info[:2] == (3, 10)):
553+
param.marks.append( # https://github.com/actions/setup-python/issues/649
554+
pytest.mark.xfail('Tk version mismatch on Azure macOS CI')
555+
)
543556

544557

545558
@pytest.mark.parametrize("env", _blit_backends)

0 commit comments

Comments
 (0)
0