Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 376e6b7

Browse filesBrowse files
committed
Test the macosx backend on Travis.
1 parent 54b4263 commit 376e6b7
Copy full SHA for 376e6b7

File tree

Expand file treeCollapse file tree

2 files changed

+8
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-5
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ install:
165165
166166
# Set flag in a delayed manner to avoid issues with installing other packages
167167
- |
168-
if [[ $TRAVIS_OS_NAME != 'osx' ]] && [[ $RUN_PYTEST == 1 ]]; then
168+
if [[ $RUN_PYTEST == 1 ]]; then
169169
export CPPFLAGS=--coverage
170170
fi
171171
- |

‎lib/matplotlib/tests/test_backends_interactive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backends_interactive.py
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
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

1919
def _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,
@@ -128,7 +131,7 @@ def test_interactive_backend(backend):
128131
f"{proc.returncode}.")
129132

130133

131-
@pytest.mark.skipif('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI' in os.environ,
134+
@pytest.mark.skipif('TF_BUILD' in os.environ,
132135
reason="this test fails an azure for unknown reasons")
133136
@pytest.mark.skipif(os.name == "nt", reason="Cannot send SIGINT on Windows.")
134137
def test_webagg():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.