From cd5624f50ad92317868514ad5b024a58dbdb233c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 17 Mar 2023 19:53:52 +0100 Subject: 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 --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 134f967e9..3df91f4c4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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') -- cgit v1.2.3-54-g00ecf