diff --git a/.travis.yml b/.travis.yml index 42c374745..e6608ac15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,6 @@ matrix: include: - os: linux env: TESTENV=py34-cov - - os: linux - env: TESTENV=unittests-nodisp - os: linux env: DOCKER=debian-jessie services: docker diff --git a/tests/conftest.py b/tests/conftest.py index 24ab37940..67be7f8e0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -100,13 +100,6 @@ def pytest_collection_modifyitems(items): for item in 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 and - not os.environ.get('QUTE_NO_DISPLAY', '')): - raise Exception("No display available on CI!") - skip_marker = pytest.mark.skipif( - True, reason="No DISPLAY available") - item.add_marker(skip_marker) if hasattr(item, 'module'): module_path = os.path.relpath( @@ -151,12 +144,15 @@ def pytest_addoption(parser): @pytest.fixture(scope='session', autouse=True) -def prevent_xvfb_on_buildbot(request): +def check_display(request): if (not request.config.getoption('--no-xvfb') and 'QUTE_BUILDBOT' in os.environ and request.config.xvfb is not None): raise Exception("Xvfb is running on buildbot!") + if sys.platform == 'linux' and not os.environ.get('DISPLAY', ''): + raise Exception("No display and no Xvfb available!") + @pytest.hookimpl(tryfirst=True, hookwrapper=True) def pytest_runtest_makereport(item, call): diff --git a/tox.ini b/tox.ini index 507fbb2ba..003522260 100644 --- a/tox.ini +++ b/tox.ini @@ -90,17 +90,6 @@ commands = {envpython} scripts/dev/freeze_tests.py build_exe -b {envdir}/build {envdir}/build/run-frozen-tests {posargs} -[testenv:unittests-nodisp] -basepython = python3 -passenv = {[testenv]passenv} -deps = {[testenv]deps} -setenv = - DISPLAY= - QUTE_NO_DISPLAY=1 -commands = - {envpython} scripts/link_pyqt.py --tox {envdir} - {envpython} -m pytest {posargs:tests} - [testenv:misc] ignore_errors = true basepython = python3