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

Skip to content

Commit f811b06

Browse files
committed
CI: skip tk tests on GHA as well
1 parent 4e0b60c commit f811b06

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 10 additions & 4 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(
@@ -546,8 +549,11 @@ def _test_number_of_draws_script():
546549
elif backend == "wx":
547550
param.marks.append(
548551
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)):
552+
elif (backend == 'tkagg' and
553+
('TF_BUILD' in os.environ or 'GITHUB_ACTION' in os.environ) and
554+
sys.platform == 'darwin' and
555+
sys.version_info[:2] < (3, 11)
556+
):
551557
param.marks.append( # https://github.com/actions/setup-python/issues/649
552558
pytest.mark.xfail('Tk version mismatch on Azure macOS CI')
553559
)

0 commit comments

Comments
 (0)