1313
1414
1515# Minimal smoke-testing of the backends for which the dependencies are
16- # PyPI-installable on Travis . They are not available for all tested Python
16+ # PyPI-installable on CI . They are not available for all tested Python
1717# versions so we don't fail on missing backends.
1818
1919def _get_testable_interactive_backends ():
@@ -28,19 +28,22 @@ def _get_testable_interactive_backends():
2828 (["tkinter" ], "tkagg" ),
2929 (["wx" ], "wx" ),
3030 (["wx" ], "wxagg" ),
31+ (["matplotlib.backends._macosx" ], "macosx" ),
3132 ]:
3233 reason = None
3334 missing = [dep for dep in deps if not importlib .util .find_spec (dep )]
34- if not os .environ .get ("DISPLAY" ):
35+ if sys . platform == "linux" and not os .environ .get ("DISPLAY" ):
3536 reason = "$DISPLAY is unset"
3637 elif missing :
3738 reason = "{} cannot be imported" .format (", " .join (missing ))
39+ elif backend == 'macosx' and os .environ .get ('TF_BUILD' ):
40+ reason = "macosx backend fails on Azure"
3841 if reason :
3942 backend = pytest .param (
4043 backend ,
4144 marks = pytest .mark .skip (
4245 reason = f"Skipping { backend } because { reason } " ))
43- elif backend == 'wxagg' and sys .platform == 'darwin' :
46+ elif backend . startswith ( 'wx' ) and sys .platform == 'darwin' :
4447 # ignore on OSX because that's currently broken (github #16849)
4548 backend = pytest .param (
4649 backend ,
@@ -131,7 +134,7 @@ def test_interactive_backend(backend):
131134 assert proc .stdout .count ("CloseEvent" ) == 1
132135
133136
134- @pytest .mark .skipif ('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI ' in os .environ ,
137+ @pytest .mark .skipif ('TF_BUILD ' in os .environ ,
135138 reason = "this test fails an azure for unknown reasons" )
136139@pytest .mark .skipif (os .name == "nt" , reason = "Cannot send SIGINT on Windows." )
137140def test_webagg ():
0 commit comments