Actually add test patch

This commit is contained in:
Elliott Sales de Andrade 2022-05-04 20:57:38 -04:00
parent 5c523b9ecb
commit ab79f788aa

38
22979.patch Normal file
View File

@ -0,0 +1,38 @@
From dc5b6e87b6f4e1817720ea5aea1110231aab5667 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 4 May 2022 20:41:01 -0400
Subject: [PATCH] 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.
---
lib/matplotlib/tests/test_backend_gtk3.py | 2 +-
lib/matplotlib/tests/test_backend_qt.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/matplotlib/tests/test_backend_gtk3.py b/lib/matplotlib/tests/test_backend_gtk3.py
index 5442930d117f..937ddef5a13f 100644
--- a/lib/matplotlib/tests/test_backend_gtk3.py
+++ b/lib/matplotlib/tests/test_backend_gtk3.py
@@ -6,7 +6,7 @@
pytest.importorskip("matplotlib.backends.backend_gtk3agg")
-@pytest.mark.backend("gtk3agg")
+@pytest.mark.backend("gtk3agg", skip_on_importerror=True)
def test_correct_key():
pytest.xfail("test_widget_send_event is not triggering key_press_event")
diff --git a/lib/matplotlib/tests/test_backend_qt.py b/lib/matplotlib/tests/test_backend_qt.py
index eee4e56536ec..61abf58ac84e 100644
--- a/lib/matplotlib/tests/test_backend_qt.py
+++ b/lib/matplotlib/tests/test_backend_qt.py
@@ -193,7 +193,7 @@ def test_other_signal_before_sigint(target, kwargs):
plt.figure()
-@pytest.mark.backend('Qt5Agg')
+@pytest.mark.backend('Qt5Agg', skip_on_importerror=True)
def test_fig_sigint_override(qt_core):
from matplotlib.backends.backend_qt5 import _BackendQT5
# Create a figure