From c9dcc0c0edc52f211d170cb2b9330b0e257a81a8 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Tue, 9 Feb 2021 08:48:17 +0800 Subject: [PATCH] remove app.deleteLater() from tests Multiple tests are executed by pytest with the same Python process. The QApplication instance is a global object that will be used by subsequent tests. The Qt documentation says that the object will only be deleted while running in an event loop. In addition, the Qt docs also specifically say that processEvents() does not process DeferredDelete events. i.e. calling processEvents() in a loop is not equivalent to calling QApplication.instance().exec_() --- pyqtgraph/widgets/tests/test_graphics_view.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyqtgraph/widgets/tests/test_graphics_view.py b/pyqtgraph/widgets/tests/test_graphics_view.py index c2206985..a142e10e 100644 --- a/pyqtgraph/widgets/tests/test_graphics_view.py +++ b/pyqtgraph/widgets/tests/test_graphics_view.py @@ -86,6 +86,3 @@ def test_basics_graphics_view(): assert view.currentItem is None assert view.sceneObj is None assert view.closed is True - - del view - app.deleteLater()