Move pdfjs check to the end2end conftest
This commit is contained in:
parent
cc4cd6913d
commit
9f1aacc4f0
@ -31,6 +31,7 @@ import pytest
|
|||||||
import pytest_bdd as bdd
|
import pytest_bdd as bdd
|
||||||
|
|
||||||
from qutebrowser.utils import log
|
from qutebrowser.utils import log
|
||||||
|
from qutebrowser.browser import pdfjs
|
||||||
from helpers import utils
|
from helpers import utils
|
||||||
|
|
||||||
|
|
||||||
@ -147,6 +148,12 @@ def clean_open_tabs(quteproc):
|
|||||||
quteproc.send_cmd(':tab-close')
|
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
|
## When
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ import pytest_bdd as bdd
|
|||||||
|
|
||||||
import qutebrowser
|
import qutebrowser
|
||||||
from qutebrowser.utils import docutils
|
from qutebrowser.utils import docutils
|
||||||
from qutebrowser.browser import pdfjs
|
|
||||||
|
|
||||||
bdd.scenarios('misc.feature')
|
bdd.scenarios('misc.feature')
|
||||||
|
|
||||||
@ -56,12 +55,6 @@ def update_documentation():
|
|||||||
subprocess.call([sys.executable, update_script])
|
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}'))
|
@bdd.then(bdd.parsers.parse('the cookie {name} should be set to {value}'))
|
||||||
def check_cookie(quteproc, name, value):
|
def check_cookie(quteproc, name, value):
|
||||||
"""Check if a given cookie is set correctly.
|
"""Check if a given cookie is set correctly.
|
||||||
|
Loading…
Reference in New Issue
Block a user