tests: Fix QApplication arguments

With Qt 6.5, QtWebEngine complains and aborts when it gets an empty argv:
https://bugreports.qt.io/browse/QTBUG-110157
https://codereview.qt-project.org/c/qt/qtwebengine/+/455347
https://codereview.qt-project.org/c/qt/qtwebengine/+/457045
https://www.riverbankcomputing.com/pipermail/pyqt/2023-March/045216.html

However, our custom qapp_args override for pytest-qt *does* return [] as
argv, causing all tests using QtWebEngine to fail.

We might decide to add sys.argv[0] to the given qapp_args in pytest-qt:
https://github.com/pytest-dev/pytest-qt/issues/483

But probably this should be fixed on the application-side, so let's do
exactly that.

See #7624
This commit is contained in:
Florian Bruhin 2023-03-17 19:53:52 +01:00
parent 8227b91d28
commit cd5624f50a
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ def qapp_args():
"""Make QtWebEngine unit tests run on older Qt versions + newer kernels."""
if testutils.disable_seccomp_bpf_sandbox():
return [sys.argv[0], testutils.DISABLE_SECCOMP_BPF_FLAG]
return []
return [sys.argv[0]]
@pytest.fixture(scope='session')