Fix test_webview.py without QtWebKit

This commit is contained in:
Florian Bruhin 2019-10-20 22:19:31 +02:00
parent 8a1768a41a
commit a33770d50e
2 changed files with 16 additions and 17 deletions

View File

@ -18,8 +18,7 @@
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
import pytest
from qutebrowser.browser.webkit import webview
webview = pytest.importorskip('qutebrowser.browser.webkit.webview')
@pytest.fixture

30
tox.ini
View File

@ -40,7 +40,7 @@ commands =
# other envs
[testenv:mkvenv]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
commands = {envpython} scripts/link_pyqt.py --tox {envdir}
envdir = {toxinidir}/.venv
usedevelop = true
@ -57,7 +57,7 @@ deps = {[testenv:mkvenv]deps}
# Virtualenv with PyQt5 from PyPI
[testenv:mkvenv-pypi]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
envdir = {toxinidir}/.venv
commands = {envpython} -c ""
usedevelop = true
@ -67,7 +67,7 @@ deps =
[testenv:misc]
ignore_errors = true
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
# For global .gitignore files
passenv = HOME
deps =
@ -78,7 +78,7 @@ commands =
{envpython} scripts/dev/misc_checks.py userscripts
[testenv:vulture]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/misc/requirements/requirements-vulture.txt
@ -88,7 +88,7 @@ commands =
{envpython} scripts/dev/run_vulture.py
[testenv:vulture-pyqtlink]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/misc/requirements/requirements-vulture.txt
@ -98,7 +98,7 @@ commands =
{[testenv:vulture]commands}
[testenv:pylint]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
ignore_errors = true
passenv =
deps =
@ -111,7 +111,7 @@ commands =
{envpython} scripts/dev/run_pylint_on_tests.py {toxinidir} --output-format=colorized --reports=no {posargs}
[testenv:pylint-pyqtlink]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
ignore_errors = true
passenv =
deps =
@ -124,7 +124,7 @@ commands =
{envpython} scripts/dev/run_pylint_on_tests.py {toxinidir} --output-format=colorized --reports=no {posargs}
[testenv:pylint-master]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
passenv = {[testenv:pylint]passenv}
deps =
-r{toxinidir}/requirements.txt
@ -136,7 +136,7 @@ commands =
{envpython} scripts/dev/run_pylint_on_tests.py --output-format=colorized --reports=no {posargs}
[testenv:flake8]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
passenv =
deps =
-r{toxinidir}/requirements.txt
@ -145,7 +145,7 @@ commands =
{envpython} -m flake8 {posargs:qutebrowser tests scripts}
[testenv:pyroma]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
passenv =
deps =
-r{toxinidir}/misc/requirements/requirements-pyroma.txt
@ -153,7 +153,7 @@ commands =
{envdir}/bin/pyroma .
[testenv:check-manifest]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
passenv =
deps =
-r{toxinidir}/misc/requirements/requirements-check-manifest.txt
@ -161,7 +161,7 @@ commands =
{envdir}/bin/check-manifest --ignore 'qutebrowser/git-commit-id,qutebrowser/html/doc,qutebrowser/html/doc/*,*/__pycache__'
[testenv:docs]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
whitelist_externals = git
passenv = TRAVIS TRAVIS_PULL_REQUEST
deps =
@ -173,7 +173,7 @@ commands =
{envpython} scripts/asciidoc2html.py {posargs}
[testenv:pyinstaller]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
passenv = APPDATA HOME
deps =
-r{toxinidir}/requirements.txt
@ -192,7 +192,7 @@ changedir = {toxinidir}/qutebrowser/javascript
commands = eslint --color --report-unused-disable-directives .
[testenv:mypy]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
passenv = TERM
deps =
-r{toxinidir}/requirements.txt
@ -203,7 +203,7 @@ commands =
{envpython} -m mypy qutebrowser {posargs}
[testenv:sphinx]
basepython = {env:PYTHON:python3}
basepython = {env:PYTHON:python3.8}
passenv =
usedevelop = true
deps =