Fail early when running WebEngine tests without it

This commit is contained in:
Florian Bruhin 2016-09-05 16:30:23 +02:00
parent 61270b8f92
commit a94cf90842

View File

@ -159,6 +159,9 @@ def pytest_configure(config):
webengine_arg = config.getoption('--qute-bdd-webengine')
webengine_env = os.environ.get('QUTE_BDD_WEBENGINE', '')
config.webengine = bool(webengine_arg or webengine_env)
# Fail early if QtWebEngine is not available
if config.webengine:
import PyQt5.QtWebEngineWidgets
@pytest.fixture(scope='session', autouse=True)