diff --git a/scripts/dev/ci/travis_run.sh b/scripts/dev/ci/travis_run.sh index 46a64bc9c..83f052f4c 100644 --- a/scripts/dev/ci/travis_run.sh +++ b/scripts/dev/ci/travis_run.sh @@ -1,7 +1,7 @@ #!/bin/bash if [[ $DOCKER ]]; then - docker run --privileged -v "$PWD:/outside" -e "QUTE_BDD_WEBENGINE=$QUTE_BDD_WEBENGINE" -e "DOCKER=$DOCKER" -e "CI=$CI" "qutebrowser/travis:$DOCKER" + docker run --privileged -v "$PWD:/outside" -e "QUTE_BDD_WEBENGINE=$QUTE_BDD_WEBENGINE" -e "DOCKER=$DOCKER" -e "CI=$CI" -e "TRAVIS=$TRAVIS" "qutebrowser/travis:$DOCKER" elif [[ $TESTENV == eslint ]]; then # Can't run this via tox as we can't easily install tox in the javascript travis env cd qutebrowser/javascript || exit 1 diff --git a/tests/conftest.py b/tests/conftest.py index 2ccf646dd..e1b5835fd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -224,6 +224,13 @@ def apply_fake_os(monkeypatch, request): monkeypatch.setattr('qutebrowser.utils.utils.is_posix', posix) +@pytest.fixture(scope='session', autouse=True) +def check_yaml_c_exts(): + """Make sure PyYAML C extensions are available on Travis.""" + if 'TRAVIS' in os.environ: + from yaml import CLoader + + @pytest.hookimpl(tryfirst=True, hookwrapper=True) def pytest_runtest_makereport(item, call): """Make test information available in fixtures.