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

Test the macosx backend on Travis. #16923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions 11 lib/matplotlib/tests/test_backends_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


# Minimal smoke-testing of the backends for which the dependencies are
# PyPI-installable on Travis. They are not available for all tested Python
# PyPI-installable on CI. They are not available for all tested Python
# versions so we don't fail on missing backends.

def _get_testable_interactive_backends():
Expand All @@ -28,19 +28,22 @@ def _get_testable_interactive_backends():
(["tkinter"], "tkagg"),
(["wx"], "wx"),
(["wx"], "wxagg"),
(["matplotlib.backends._macosx"], "macosx"),
]:
reason = None
missing = [dep for dep in deps if not importlib.util.find_spec(dep)]
if not os.environ.get("DISPLAY"):
if sys.platform == "linux" and not os.environ.get("DISPLAY"):
reason = "$DISPLAY is unset"
elif missing:
reason = "{} cannot be imported".format(", ".join(missing))
elif backend == 'macosx' and os.environ.get('TF_BUILD'):
reason = "macosx backend fails on Azure"
if reason:
backend = pytest.param(
backend,
marks=pytest.mark.skip(
reason=f"Skipping {backend} because {reason}"))
elif backend == 'wxagg' and sys.platform == 'darwin':
elif backend.startswith('wx') and sys.platform == 'darwin':
# ignore on OSX because that's currently broken (github #16849)
backend = pytest.param(
backend,
Expand Down Expand Up @@ -131,7 +134,7 @@ def test_interactive_backend(backend):
assert proc.stdout.count("CloseEvent") == 1


@pytest.mark.skipif('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI' in os.environ,
@pytest.mark.skipif('TF_BUILD' in os.environ,
reason="this test fails an azure for unknown reasons")
@pytest.mark.skipif(os.name == "nt", reason="Cannot send SIGINT on Windows.")
def test_webagg():
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.