Allow unittests-nodisp to run w/o DISPLAY on CI.

This commit is contained in:
Florian Bruhin 2015-09-28 22:19:33 +02:00
parent 2500b1f759
commit 1e5028a7f3
2 changed files with 5 additions and 2 deletions

View File

@ -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")

View File

@ -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}