Allow unittests-nodisp to run w/o DISPLAY on CI.
This commit is contained in:
parent
2500b1f759
commit
1e5028a7f3
@ -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")
|
||||
|
4
tox.ini
4
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}
|
||||
|
Loading…
Reference in New Issue
Block a user