@@ -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 (
@@ -271,7 +274,8 @@ def _test_thread_impl():
271274 reason = 'PyPy does not support Tkinter threading: '
272275 'https://foss.heptapod.net/pypy/pypy/-/issues/1929' ,
273276 strict = True ))
274- elif (backend == 'tkagg' and 'TF_BUILD' in os .environ and
277+ elif (backend == 'tkagg' and
278+ ('TF_BUILD' in os .environ or 'GITHUB_ACTION' in os .environ ) and
275279 sys .platform == 'darwin' and sys .version_info [:2 ] < (3 , 11 )):
276280 param .marks .append ( # https://github.com/actions/setup-python/issues/649
277281 pytest .mark .xfail ('Tk version mismatch on Azure macOS CI' ))
@@ -552,8 +556,11 @@ def _test_number_of_draws_script():
552556 elif backend == "wx" :
553557 param .marks .append (
554558 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 , 11 )):
559+ elif (backend == 'tkagg' and
560+ ('TF_BUILD' in os .environ or 'GITHUB_ACTION' in os .environ ) and
561+ sys .platform == 'darwin' and
562+ sys .version_info [:2 ] < (3 , 11 )
563+ ):
557564 param .marks .append ( # https://github.com/actions/setup-python/issues/649
558565 pytest .mark .xfail ('Tk version mismatch on Azure macOS CI' )
559566 )
0 commit comments