Skip to content

Commit 5c256f7

Browse files
committed
TST: Skip wx tests when on pure Wayland
Support for pure Wayland was only added 3 weeks ago in wxWidgets/Phoenix#2638 and is not in a release.
1 parent a5c0b86 commit 5c256f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ def _get_available_interactive_backends():
7878
missing = [dep for dep in deps if not importlib.util.find_spec(dep)]
7979
if missing:
8080
reason = "{} cannot be imported".format(", ".join(missing))
81-
elif env["MPLBACKEND"] == "tkagg" and _is_linux_and_xdisplay_invalid:
81+
elif _is_linux_and_xdisplay_invalid and (
82+
env["MPLBACKEND"] == "tkagg"
83+
# Remove when https://github.com/wxWidgets/Phoenix/pull/2638 is out.
84+
or env["MPLBACKEND"].startswith("wx")):
8285
reason = "$DISPLAY is unset"
8386
elif _is_linux_and_display_invalid:
8487
reason = "$DISPLAY and $WAYLAND_DISPLAY are unset"

0 commit comments

Comments
 (0)