diff --git a/tests/conftest.py b/tests/conftest.py index b234fc0e3..43d5e0e25 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -61,7 +61,8 @@ def pytest_collection_modifyitems(items): if 'qapp' in getattr(item, 'fixturenames', ()): item.add_marker('gui') if sys.platform == 'linux' and not os.environ.get('DISPLAY', ''): - if 'CI' in os.environ: + if ('CI' in os.environ and + not os.environ.get('QUTE_NO_DISPLAY_OK', '')): raise Exception("No display available on CI!") skip_marker = pytest.mark.skipif( True, reason="No DISPLAY available") diff --git a/tox.ini b/tox.ini index 2522b1c46..f2045195b 100644 --- a/tox.ini +++ b/tox.ini @@ -66,7 +66,9 @@ commands = basepython = python3 passenv = {[testenv]passenv} deps = {[testenv]deps} -setenv = DISPLAY= +setenv = + DISPLAY= + QUTE_NO_DISPLAY_OK=1 commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envpython} -m py.test --strict -rfEsw -m 'not integration' {posargs:tests}