Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 648a74a

Browse files
authored
Merge pull request #26021 from QuLogic/auto-backport-of-pr-26005-on-v3.7.x
Backport PR #26005 on branch v3.7.x (Fix backend tests on CI)
2 parents 28eb201 + a913771 commit 648a74a

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
@@ -48,16 +48,24 @@ jobs:
4848
python-version: 3.8
4949
extra-requirements: '-r requirements/testing/extra.txt'
5050
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
51+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
52+
pyside6-ver: '!=6.5.1'
5153
- os: ubuntu-20.04
5254
python-version: 3.9
5355
extra-requirements: '-r requirements/testing/extra.txt'
5456
- os: ubuntu-20.04
5557
python-version: '3.10'
5658
extra-requirements: '-r requirements/testing/extra.txt'
59+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
60+
pyside6-ver: '!=6.5.1'
5761
- os: ubuntu-20.04
5862
python-version: '3.11'
63+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
64+
pyside6-ver: '!=6.5.1'
5965
- os: macos-latest
6066
python-version: 3.8
67+
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
68+
pyside6-ver: '!=6.5.1'
6169

6270
steps:
6371
- 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)},
@@ -267,6 +271,10 @@ def _test_thread_impl():
267271
reason='PyPy does not support Tkinter threading: '
268272
'https://foss.heptapod.net/pypy/pypy/-/issues/1929',
269273
strict=True))
274+
elif (backend == 'tkagg' and 'TF_BUILD' in os.environ and
275+
sys.platform == 'darwin' and sys.version_info[:2] == (3, 10)):
276+
param.marks.append( # https://github.com/actions/setup-python/issues/649
277+
pytest.mark.xfail('Tk version mismatch on Azure macOS CI'))
270278

271279

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

548561

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

0 commit comments

Comments
 (0)