diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py index 0e6d996b9..ea8fbda0b 100644 --- a/tests/end2end/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -31,6 +31,7 @@ import pytest import pytest_bdd as bdd from qutebrowser.utils import log +from qutebrowser.browser import pdfjs from helpers import utils @@ -147,6 +148,12 @@ def clean_open_tabs(quteproc): quteproc.send_cmd(':tab-close') +@bdd.given('pdfjs is available') +def pdfjs_available(): + if not pdfjs.is_available(): + pytest.skip("No pdfjs installation found.") + + ## When diff --git a/tests/end2end/features/test_misc_bdd.py b/tests/end2end/features/test_misc_bdd.py index db3e53d52..177f7f383 100644 --- a/tests/end2end/features/test_misc_bdd.py +++ b/tests/end2end/features/test_misc_bdd.py @@ -27,7 +27,6 @@ import pytest_bdd as bdd import qutebrowser from qutebrowser.utils import docutils -from qutebrowser.browser import pdfjs bdd.scenarios('misc.feature') @@ -56,12 +55,6 @@ def update_documentation(): subprocess.call([sys.executable, update_script]) -@bdd.given('pdfjs is available') -def pdfjs_available(): - if not pdfjs.is_available(): - pytest.skip("No pdfjs installation found.") - - @bdd.then(bdd.parsers.parse('the cookie {name} should be set to {value}')) def check_cookie(quteproc, name, value): """Check if a given cookie is set correctly.