From b1b767ed96b4603b19e9c346ccc923a6f58ae7a6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 6 Jan 2016 08:36:40 +0100 Subject: [PATCH] tests: Don't start Xvfb for unittests-nodisp. --- tests/conftest.py | 7 +++++-- tox.ini | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 35a3235df..497f1715c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -109,7 +109,7 @@ def pytest_collection_modifyitems(items): 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_OK', '')): + not os.environ.get('QUTE_NO_DISPLAY', '')): raise Exception("No display available on CI!") skip_marker = pytest.mark.skipif( True, reason="No DISPLAY available") @@ -374,7 +374,10 @@ def pytest_configure(config): if os.environ.get('DISPLAY', None) == '': # xvfbwrapper doesn't handle DISPLAY="" correctly del os.environ['DISPLAY'] - if sys.platform.startswith('linux') and not config.getoption('--no-xvfb'): + + if (sys.platform.startswith('linux') and + not config.getoption('--no-xvfb') and + 'QUTE_NO_DISPLAY' not in os.environ): assert 'QUTE_BUILDBOT' not in os.environ try: disp = xvfbwrapper.Xvfb(width=800, height=600, colordepth=16) diff --git a/tox.ini b/tox.ini index f0fa72491..8f90baafa 100644 --- a/tox.ini +++ b/tox.ini @@ -73,7 +73,7 @@ passenv = {[testenv]passenv} deps = {[testenv]deps} setenv = DISPLAY= - QUTE_NO_DISPLAY_OK=1 + QUTE_NO_DISPLAY=1 commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envpython} -m py.test --strict -rfEw {posargs:tests}