Skip to content

Commit e83e847

Browse files
committed
TST: Skip cross-Qt checks if no X/Wayland display is available
1 parent 5c256f7 commit e83e847

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ def qt5_and_qt6_pairs():
455455
yield from ([qt5, qt6], [qt6, qt5])
456456

457457

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

0 commit comments

Comments
 (0)