We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e872b0 commit a3a382fCopy full SHA for a3a382f
pytestqt/plugin.py
@@ -380,13 +380,14 @@ def qapp():
380
"""
381
app = QApplication.instance()
382
if app is None:
383
- app = QApplication([])
+ global _qapp_instance
384
+ _qapp_instance = QApplication([])
385
yield app
- app.exit()
386
- app.deleteLater()
387
else:
388
yield app # pragma: no cover
389
+_qapp_instance = None
390
+
391
392
@pytest.yield_fixture
393
def qtbot(qapp, request):
@@ -397,7 +398,6 @@ def qtbot(qapp, request):
397
398
that they are properly closed after the test ends.
399
400
result = QtBot(qapp)
- assert 0
401
no_capture = request.node.get_marker('qt_no_exception_capture') or \
402
request.config.getini('qt_no_exception_capture')
403
if no_capture:
0 commit comments