Skip to content

Commit 6baa706

Browse files
authored
Merge pull request #29226 from meeseeksmachine/auto-backport-of-pr-29206-on-v3.10.x
Backport PR #29206 on branch v3.10.x (Skip more tests on pure-Wayland systems)
2 parents ee02ba7 + aa6926b commit 6baa706

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/matplotlib/tests/test_backends_interactive.py

+7-1
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"
@@ -452,6 +455,9 @@ def qt5_and_qt6_pairs():
452455
yield from ([qt5, qt6], [qt6, qt5])
453456

454457

458+
@pytest.mark.skipif(
459+
sys.platform == "linux" and not _c_internal_utils.display_is_valid(),
460+
reason="$DISPLAY and $WAYLAND_DISPLAY are unset")
455461
@pytest.mark.parametrize('host, mpl', [*qt5_and_qt6_pairs()])
456462
def test_cross_Qt_imports(host, mpl):
457463
try:

0 commit comments

Comments
 (0)