13
13
14
14
15
15
# 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
17
17
# versions so we don't fail on missing backends.
18
18
19
19
def _get_testable_interactive_backends ():
@@ -28,19 +28,22 @@ def _get_testable_interactive_backends():
28
28
(["tkinter" ], "tkagg" ),
29
29
(["wx" ], "wx" ),
30
30
(["wx" ], "wxagg" ),
31
+ (["matplotlib.backends._macosx" ], "macosx" ),
31
32
]:
32
33
reason = None
33
34
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" ):
35
36
reason = "$DISPLAY is unset"
36
37
elif missing :
37
38
reason = "{} cannot be imported" .format (", " .join (missing ))
39
+ elif backend == 'macosx' and os .environ .get ('TF_BUILD' ):
40
+ reason = "macosx backend fails on Azure"
38
41
if reason :
39
42
backend = pytest .param (
40
43
backend ,
41
44
marks = pytest .mark .skip (
42
45
reason = f"Skipping { backend } because { reason } " ))
43
- elif backend == 'wxagg' and sys .platform == 'darwin' :
46
+ elif backend . startswith ( 'wx' ) and sys .platform == 'darwin' :
44
47
# ignore on OSX because that's currently broken (github #16849)
45
48
backend = pytest .param (
46
49
backend ,
@@ -131,7 +134,7 @@ def test_interactive_backend(backend):
131
134
assert proc .stdout .count ("CloseEvent" ) == 1
132
135
133
136
134
- @pytest .mark .skipif ('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI ' in os .environ ,
137
+ @pytest .mark .skipif ('TF_BUILD ' in os .environ ,
135
138
reason = "this test fails an azure for unknown reasons" )
136
139
@pytest .mark .skipif (os .name == "nt" , reason = "Cannot send SIGINT on Windows." )
137
140
def test_webagg ():
0 commit comments