Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc5b6e8

Browse files
committed
Skip additional backend tests on import error
All the Qt tests in this file already do this, and the remaining one fails if running headless.
1 parent 2aa71eb commit dc5b6e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/matplotlib/tests/test_backend_gtk3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
pytest.importorskip("matplotlib.backends.backend_gtk3agg")
77

88

9-
@pytest.mark.backend("gtk3agg")
9+
@pytest.mark.backend("gtk3agg", skip_on_importerror=True)
1010
def test_correct_key():
1111
pytest.xfail("test_widget_send_event is not triggering key_press_event")
1212

lib/matplotlib/tests/test_backend_qt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def test_other_signal_before_sigint(target, kwargs):
193193
plt.figure()
194194

195195

196-
@pytest.mark.backend('Qt5Agg')
196+
@pytest.mark.backend('Qt5Agg', skip_on_importerror=True)
197197
def test_fig_sigint_override(qt_core):
198198
from matplotlib.backends.backend_qt5 import _BackendQT5
199199
# Create a figure

0 commit comments

Comments
 (0)