@@ -63,8 +63,11 @@ def _get_testable_interactive_backends():
63
63
elif env ["MPLBACKEND" ].startswith ('wx' ) and sys .platform == 'darwin' :
64
64
# ignore on OSX because that's currently broken (github #16849)
65
65
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
+ ):
68
71
marks .append ( # https://github.com/actions/setup-python/issues/649
69
72
pytest .mark .xfail (reason = 'Tk version mismatch on Azure macOS CI' ))
70
73
envs .append (
@@ -273,7 +276,8 @@ def _test_thread_impl():
273
276
reason = 'PyPy does not support Tkinter threading: '
274
277
'https://foss.heptapod.net/pypy/pypy/-/issues/1929' ,
275
278
strict = True ))
276
- elif (backend == 'tkagg' and 'TF_BUILD' in os .environ and
279
+ elif (backend == 'tkagg' and
280
+ ('TF_BUILD' in os .environ or 'GITHUB_ACTION' in os .environ ) and
277
281
sys .platform == 'darwin' and sys .version_info [:2 ] < (3 , 11 )):
278
282
param .marks .append ( # https://github.com/actions/setup-python/issues/649
279
283
pytest .mark .xfail ('Tk version mismatch on Azure macOS CI' ))
@@ -546,8 +550,11 @@ def _test_number_of_draws_script():
546
550
elif backend == "wx" :
547
551
param .marks .append (
548
552
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 )):
553
+ elif (backend == 'tkagg' and
554
+ ('TF_BUILD' in os .environ or 'GITHUB_ACTION' in os .environ ) and
555
+ sys .platform == 'darwin' and
556
+ sys .version_info [:2 ] < (3 , 11 )
557
+ ):
551
558
param .marks .append ( # https://github.com/actions/setup-python/issues/649
552
559
pytest .mark .xfail ('Tk version mismatch on Azure macOS CI' )
553
560
)
0 commit comments