Make more unit tests run with Qt 5.7.1 on a newer Linux

This commit is contained in:
Florian Bruhin 2017-11-28 08:16:07 +01:00
parent 0850aab96f
commit 56759cca6b
2 changed files with 14 additions and 2 deletions

View File

@ -51,7 +51,8 @@ qt_log_ignore =
^Error when parsing the netrc file
^Image of format '' blocked because it is not considered safe. If you are sure it is safe to do so, you can white-list the format by setting the environment variable QTWEBKIT_IMAGEFORMAT_WHITELIST=
^QPainter::end: Painter ended with \d+ saved states
^QSslSocket: cannot resolve *
^QSslSocket: cannot resolve .*
^QSslSocket: cannot call unresolved function .*
^Incompatible version of OpenSSL
^QQuickWidget::invalidateRenderControl could not make context current
^libpng warning: iCCP: known incorrect sRGB profile

View File

@ -28,7 +28,7 @@ import warnings
import sip
import pytest
import hypothesis
from PyQt5.QtCore import PYQT_VERSION
from PyQt5.QtCore import qVersion, PYQT_VERSION
pytest.register_assert_rewrite('helpers')
@ -151,6 +151,17 @@ def pytest_ignore_collect(path):
return rel_path == os.path.join('end2end', 'features') and skip_bdd
@pytest.fixture(scope='session')
def qapp_args():
"""Make QtWebEngine unit tests run on Qt 5.7.1.
See https://github.com/qutebrowser/qutebrowser/issues/3163
"""
if qVersion() == '5.7.1':
return [sys.argv[0], '--disable-seccomp-filter-sandbox']
return []
@pytest.fixture(scope='session')
def qapp(qapp):
"""Change the name of the QApplication instance."""