From 8587afa3e5817d4d2ea9a8f359df4cba74ba4a61 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Wed, 24 Jan 2018 16:47:15 -0800 Subject: [PATCH] Mark the qt5 interactive test as xfail. --- lib/matplotlib/tests/test_backends_interactive.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py index 07d5759bbe0c..f8094aa6f165 100644 --- a/lib/matplotlib/tests/test_backends_interactive.py +++ b/lib/matplotlib/tests/test_backends_interactive.py @@ -23,15 +23,16 @@ def _get_testable_interactive_backends(): (["PyQt5"], "qt5agg"), (["tkinter"], "tkagg"), (["wx"], "wxagg")]: - reason = None + mark = lambda backend: backend if sys.version_info < (3,): - reason = "Py3-only test" + mark = pytest.mark.skip(reason="Py3-only test") elif not os.environ.get("DISPLAY"): - reason = "No $DISPLAY" + mark = pytest.mark.skip(reason="No $DISPLAY") elif any(importlib.util.find_spec(dep) is None for dep in deps): - reason = "Missing dependency" - backends.append(pytest.mark.skip(reason=reason)(backend) if reason - else backend) + mark = pytest.mark.skip(reason="Missing dependency") + elif backend == "qt5agg": + mark = pytest.mark.xfail(reason="Currently broken on Travis") + backends.append(mark(backend)) return backends