Skip to content

Commit 330969c

Browse files
authored
Merge pull request #26005 from QuLogic/fix-ci
Fix backend tests on CI
2 parents 3d3a1af + db3477c commit 330969c

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,21 @@ jobs:
6262
python-version: 3.9
6363
extra-requirements: '-r requirements/testing/extra.txt'
6464
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
65+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
66+
pyside6-ver: '!=6.5.1'
6567
- os: ubuntu-20.04
6668
python-version: '3.10'
6769
extra-requirements: '-r requirements/testing/extra.txt'
70+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
71+
pyside6-ver: '!=6.5.1'
6872
- os: ubuntu-20.04
6973
python-version: '3.11'
74+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
75+
pyside6-ver: '!=6.5.1'
7076
- os: macos-latest
7177
python-version: 3.9
78+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
79+
pyside6-ver: '!=6.5.1'
7280

7381
steps:
7482
- uses: actions/checkout@v3

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)