Skip to content

Backport PR #26005 on branch v3.7.x (Fix backend tests on CI) #26021

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
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
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,24 @@ jobs:
python-version: 3.8
extra-requirements: '-r requirements/testing/extra.txt'
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
pyside6-ver: '!=6.5.1'
- os: ubuntu-20.04
python-version: 3.9
extra-requirements: '-r requirements/testing/extra.txt'
- os: ubuntu-20.04
python-version: '3.10'
extra-requirements: '-r requirements/testing/extra.txt'
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
pyside6-ver: '!=6.5.1'
- os: ubuntu-20.04
python-version: '3.11'
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
pyside6-ver: '!=6.5.1'
- os: macos-latest
python-version: 3.8
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
pyside6-ver: '!=6.5.1'

steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions lib/matplotlib/tests/test_backend_tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def _isolated_tk_test(success_count, func=None):
sys.platform == "linux" and not _c_internal_utils.display_is_valid(),
reason="$DISPLAY and $WAYLAND_DISPLAY are unset"
)
@pytest.mark.xfail( # https://github.com/actions/setup-python/issues/649
'TF_BUILD' in os.environ and sys.platform == 'darwin' and
sys.version_info[:2] == (3, 10),
reason='Tk version mismatch on Azure macOS CI'
)
@functools.wraps(func)
def test_func():
# even if the package exists, may not actually be importable this can
Expand Down
13 changes: 13 additions & 0 deletions lib/matplotlib/tests/test_backends_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def _get_testable_interactive_backends():
elif env["MPLBACKEND"].startswith('wx') and sys.platform == 'darwin':
# ignore on OSX because that's currently broken (github #16849)
marks.append(pytest.mark.xfail(reason='github #16849'))
elif (env['MPLBACKEND'] == 'tkagg' and 'TF_BUILD' in os.environ and
sys.platform == 'darwin' and sys.version_info[:2] == (3, 10)):
marks.append( # https://github.com/actions/setup-python/issues/649
pytest.mark.xfail(reason='Tk version mismatch on Azure macOS CI'))
envs.append(
pytest.param(
{**env, 'BACKEND_DEPS': ','.join(deps)},
Expand Down Expand Up @@ -267,6 +271,10 @@ def _test_thread_impl():
reason='PyPy does not support Tkinter threading: '
'https://foss.heptapod.net/pypy/pypy/-/issues/1929',
strict=True))
elif (backend == 'tkagg' and 'TF_BUILD' in os.environ and
sys.platform == 'darwin' and sys.version_info[:2] == (3, 10)):
param.marks.append( # https://github.com/actions/setup-python/issues/649
pytest.mark.xfail('Tk version mismatch on Azure macOS CI'))


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


@pytest.mark.parametrize("env", _blit_backends)
Expand Down