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_()
This commit is contained in:
KIU Shueng Chuan 2021-02-09 08:48:17 +08:00
parent ade6a844e7
commit c9dcc0c0ed

View File

@ -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()