python-matplotlib/0006-Fix-broken-QApplication-init-in-a-test.patch
Elliott Sales de Andrade 58b78d7e5b Fix return type in get_data_path patch.
And update the flaky test patch to work again.
2021-08-25 16:36:32 -04:00

30 lines
1.1 KiB
Diff

From d4386df74371c2dcec9bb1a7f588f46639087c49 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Tue, 24 Aug 2021 05:03:15 -0400
Subject: [PATCH 6/6] Fix broken QApplication init in a test.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/tests/test_backend_qt.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/matplotlib/tests/test_backend_qt.py b/lib/matplotlib/tests/test_backend_qt.py
index b7fb708bee..ff104fcfbe 100644
--- a/lib/matplotlib/tests/test_backend_qt.py
+++ b/lib/matplotlib/tests/test_backend_qt.py
@@ -379,8 +379,9 @@ def test_canvas_reinit():
@pytest.mark.backend('Qt5Agg', skip_on_importerror=True)
def test_form_widget_get_with_datetime_and_date_fields():
- if not QtWidgets.QApplication.instance():
- QtWidgets.QApplication()
+ from matplotlib.backends.backend_qt import _create_qApp
+ _create_qApp()
+
form = [
("Datetime field", datetime(year=2021, month=3, day=11)),
("Date field", date(year=2021, month=3, day=11))
--
2.31.1