2015-03-26 08:00:20 +01:00
|
|
|
# Tox (http://tox.testrun.org/) is a tool for running tests
|
|
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
|
|
# and then run "tox" from this directory.
|
|
|
|
|
|
|
|
[tox]
|
2018-07-03 13:27:18 +02:00
|
|
|
envlist = py36-pyqt511-cov,misc,vulture,flake8,pylint,pyroma,check-manifest,eslint
|
2016-07-20 16:02:14 +02:00
|
|
|
distshare = {toxworkdir}
|
2016-08-09 11:08:19 +02:00
|
|
|
skipsdist = true
|
2015-03-26 08:00:20 +01:00
|
|
|
|
|
|
|
[testenv]
|
2015-05-16 14:22:56 +02:00
|
|
|
# https://bitbucket.org/hpk42/tox/issue/246/ - only needed for Windows though
|
2015-08-07 06:38:12 +02:00
|
|
|
setenv =
|
|
|
|
QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms
|
|
|
|
PYTEST_QT_API=pyqt5
|
2018-06-23 14:32:57 +02:00
|
|
|
pyqt{,56,571,59,510,511}: LINK_PYQT_SKIP=true
|
|
|
|
pyqt{,56,571,59,510,511}: QUTE_BDD_WEBENGINE=true
|
2017-11-29 09:29:53 +01:00
|
|
|
cov: PYTEST_ADDOPTS=--cov --cov-report xml --cov-report=html --cov-report=
|
2018-09-17 11:32:13 +02:00
|
|
|
passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI TRAVIS XDG_* QUTE_* DOCKER QT_QUICK_BACKEND
|
2017-11-29 09:29:53 +01:00
|
|
|
basepython =
|
2018-07-03 13:32:53 +02:00
|
|
|
py35: {env:PYTHON:python3.5}
|
|
|
|
py36: {env:PYTHON:python3.6}
|
|
|
|
py37: {env:PYTHON:python3.7}
|
2015-03-30 22:09:56 +02:00
|
|
|
deps =
|
2015-05-27 07:45:09 +02:00
|
|
|
-r{toxinidir}/requirements.txt
|
2016-05-29 16:53:54 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-tests.txt
|
2017-11-30 21:14:11 +01:00
|
|
|
pyqt: -r{toxinidir}/misc/requirements/requirements-pyqt.txt
|
2017-11-29 09:29:53 +01:00
|
|
|
pyqt571: PyQt5==5.7.1
|
|
|
|
pyqt59: PyQt5==5.9.2
|
2018-02-28 06:28:01 +01:00
|
|
|
pyqt510: PyQt5==5.10.1
|
2018-10-03 22:19:59 +02:00
|
|
|
pyqt511: PyQt5==5.11.3
|
2016-01-24 20:01:14 +01:00
|
|
|
commands =
|
2017-12-01 17:51:41 +01:00
|
|
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
2017-03-18 21:08:07 +01:00
|
|
|
{envpython} -bb -m pytest {posargs:tests}
|
2017-11-29 09:29:53 +01:00
|
|
|
cov: {envpython} scripts/dev/check_coverage.py {posargs}
|
2017-09-10 01:14:52 +02:00
|
|
|
|
2017-02-08 14:02:03 +01:00
|
|
|
# other envs
|
|
|
|
|
2015-08-08 21:11:38 +02:00
|
|
|
[testenv:mkvenv]
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2016-09-08 18:50:53 +02:00
|
|
|
commands = {envpython} scripts/link_pyqt.py --tox {envdir}
|
|
|
|
envdir = {toxinidir}/.venv
|
|
|
|
usedevelop = true
|
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
|
2016-05-15 09:59:44 +02:00
|
|
|
# This is undocumented, but it's a common typo, so let's make it work
|
|
|
|
[testenv:mkenv]
|
|
|
|
basepython = {[testenv:mkvenv]basepython}
|
|
|
|
commands = {[testenv:mkvenv]commands}
|
|
|
|
envdir = {[testenv:mkvenv]envdir}
|
|
|
|
usedevelop = {[testenv:mkvenv]usedevelop}
|
|
|
|
deps = {[testenv:mkvenv]deps}
|
|
|
|
|
2017-02-25 18:17:32 +01:00
|
|
|
# Virtualenv with PyQt5 from PyPI
|
|
|
|
[testenv:mkvenv-pypi]
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2017-02-25 18:17:32 +01:00
|
|
|
envdir = {toxinidir}/.venv
|
|
|
|
commands = {envpython} -c ""
|
|
|
|
usedevelop = true
|
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements.txt
|
2018-06-23 14:32:57 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-pyqt.txt
|
2017-02-25 18:17:32 +01:00
|
|
|
|
2015-03-26 08:00:20 +01:00
|
|
|
[testenv:misc]
|
2015-11-30 07:00:20 +01:00
|
|
|
ignore_errors = true
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2015-08-08 14:46:23 +02:00
|
|
|
# For global .gitignore files
|
|
|
|
passenv = HOME
|
2016-08-09 11:10:50 +02:00
|
|
|
deps =
|
2015-03-26 08:00:20 +01:00
|
|
|
commands =
|
2015-06-28 22:31:30 +02:00
|
|
|
{envpython} scripts/dev/misc_checks.py git
|
|
|
|
{envpython} scripts/dev/misc_checks.py vcs
|
|
|
|
{envpython} scripts/dev/misc_checks.py spelling
|
2015-10-05 23:27:19 +02:00
|
|
|
|
|
|
|
[testenv:vulture]
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2016-07-29 08:51:23 +02:00
|
|
|
deps =
|
2016-08-09 13:54:54 +02:00
|
|
|
-r{toxinidir}/requirements.txt
|
2016-07-29 08:51:23 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-vulture.txt
|
2017-09-10 01:44:53 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-pyqt.txt
|
2016-08-09 13:54:54 +02:00
|
|
|
setenv = PYTHONPATH={toxinidir}
|
2015-10-05 23:27:19 +02:00
|
|
|
commands =
|
2015-10-04 23:02:03 +02:00
|
|
|
{envpython} scripts/dev/run_vulture.py
|
2015-03-26 08:00:20 +01:00
|
|
|
|
2017-11-29 09:29:53 +01:00
|
|
|
[testenv:vulture-pyqtlink]
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2017-11-29 09:29:53 +01:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/misc/requirements/requirements-vulture.txt
|
|
|
|
setenv = PYTHONPATH={toxinidir}
|
|
|
|
commands =
|
|
|
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
2017-11-30 23:58:14 +01:00
|
|
|
{[testenv:vulture]commands}
|
2017-11-29 09:29:53 +01:00
|
|
|
|
2015-03-26 08:00:20 +01:00
|
|
|
[testenv:pylint]
|
2017-05-17 13:48:31 +02:00
|
|
|
basepython = {env:PYTHON:python3}
|
2015-11-30 07:00:20 +01:00
|
|
|
ignore_errors = true
|
2015-08-08 21:11:38 +02:00
|
|
|
passenv =
|
2015-03-26 08:00:20 +01:00
|
|
|
deps =
|
2017-11-30 23:58:14 +01:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/misc/requirements/requirements-tests.txt
|
2016-05-29 16:53:54 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-pylint.txt
|
2017-05-17 19:08:59 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-pyqt.txt
|
2015-03-26 08:00:20 +01:00
|
|
|
commands =
|
2016-07-07 23:22:42 +02:00
|
|
|
{envpython} -m pylint scripts qutebrowser --output-format=colorized --reports=no {posargs}
|
|
|
|
{envpython} scripts/dev/run_pylint_on_tests.py {toxinidir} --output-format=colorized --reports=no {posargs}
|
2015-10-26 18:51:41 +01:00
|
|
|
|
2017-11-29 09:29:53 +01:00
|
|
|
[testenv:pylint-pyqtlink]
|
|
|
|
basepython = {env:PYTHON:python3}
|
|
|
|
ignore_errors = true
|
|
|
|
passenv =
|
|
|
|
deps =
|
2017-11-30 23:58:14 +01:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/misc/requirements/requirements-tests.txt
|
2017-11-29 09:29:53 +01:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-pylint.txt
|
|
|
|
commands =
|
|
|
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
2017-12-04 06:36:42 +01:00
|
|
|
{envpython} -m pylint scripts qutebrowser --output-format=colorized --reports=no {posargs}
|
|
|
|
{envpython} scripts/dev/run_pylint_on_tests.py {toxinidir} --output-format=colorized --reports=no {posargs}
|
2017-11-29 09:29:53 +01:00
|
|
|
|
2016-03-09 21:20:30 +01:00
|
|
|
[testenv:pylint-master]
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2015-12-15 11:49:06 +01:00
|
|
|
passenv = {[testenv:pylint]passenv}
|
2015-10-26 18:51:41 +01:00
|
|
|
deps =
|
2017-11-30 23:58:14 +01:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/misc/requirements/requirements-tests.txt
|
2016-06-02 09:54:51 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-pylint-master.txt
|
2015-10-26 18:51:41 +01:00
|
|
|
commands =
|
|
|
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
2016-03-09 21:20:52 +01:00
|
|
|
{envpython} -m pylint scripts qutebrowser --output-format=colorized --reports=no {posargs}
|
|
|
|
{envpython} scripts/dev/run_pylint_on_tests.py --output-format=colorized --reports=no {posargs}
|
2015-03-26 08:00:20 +01:00
|
|
|
|
2016-01-21 18:11:31 +01:00
|
|
|
[testenv:flake8]
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2015-08-08 21:11:38 +02:00
|
|
|
passenv =
|
2015-03-26 08:00:20 +01:00
|
|
|
deps =
|
2015-05-17 01:18:19 +02:00
|
|
|
-r{toxinidir}/requirements.txt
|
2016-05-29 16:53:54 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-flake8.txt
|
2015-03-26 08:00:20 +01:00
|
|
|
commands =
|
2016-08-09 17:12:42 +02:00
|
|
|
{envpython} -m flake8 {posargs:qutebrowser tests scripts}
|
2015-03-26 08:00:20 +01:00
|
|
|
|
|
|
|
[testenv:pyroma]
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2015-08-08 21:11:38 +02:00
|
|
|
passenv =
|
2016-08-09 11:10:50 +02:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/misc/requirements/requirements-pyroma.txt
|
2015-03-26 08:00:20 +01:00
|
|
|
commands =
|
|
|
|
{envdir}/bin/pyroma .
|
|
|
|
|
|
|
|
[testenv:check-manifest]
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2015-08-08 21:11:38 +02:00
|
|
|
passenv =
|
2016-08-09 11:10:50 +02:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/misc/requirements/requirements-check-manifest.txt
|
2015-03-26 08:00:20 +01:00
|
|
|
commands =
|
|
|
|
{envdir}/bin/check-manifest --ignore 'qutebrowser/git-commit-id,qutebrowser/html/doc,qutebrowser/html/doc/*,*/__pycache__'
|
2015-03-26 09:18:21 +01:00
|
|
|
|
|
|
|
[testenv:docs]
|
2017-12-04 06:45:47 +01:00
|
|
|
basepython = {env:PYTHON:python3}
|
2015-03-26 20:37:53 +01:00
|
|
|
whitelist_externals = git
|
2017-07-04 12:59:28 +02:00
|
|
|
passenv = TRAVIS TRAVIS_PULL_REQUEST
|
2015-03-26 09:18:21 +01:00
|
|
|
deps =
|
2015-05-17 01:18:19 +02:00
|
|
|
-r{toxinidir}/requirements.txt
|
2017-09-10 01:44:53 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-pyqt.txt
|
2015-03-26 09:18:21 +01:00
|
|
|
commands =
|
2016-03-16 06:22:36 +01:00
|
|
|
{envpython} scripts/dev/src2asciidoc.py {posargs}
|
2016-04-20 22:35:02 +02:00
|
|
|
{envpython} scripts/dev/check_doc_changes.py {posargs}
|
2015-03-26 09:18:21 +01:00
|
|
|
{envpython} scripts/asciidoc2html.py {posargs}
|
2015-04-03 00:05:20 +02:00
|
|
|
|
2016-03-26 19:54:07 +01:00
|
|
|
[testenv:pyinstaller]
|
2017-04-14 20:49:10 +02:00
|
|
|
# WORKAROUND for https://github.com/tox-dev/tox/issues/503
|
|
|
|
install_command = pip install --exists-action w {opts} {packages}
|
2017-04-14 20:11:40 +02:00
|
|
|
basepython = {env:PYTHON:python3}
|
2017-10-11 14:09:45 +02:00
|
|
|
passenv = APPDATA HOME
|
2016-03-26 19:54:07 +01:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements.txt
|
2016-05-29 16:53:54 +02:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-pyinstaller.txt
|
2017-03-08 19:06:35 +01:00
|
|
|
-r{toxinidir}/misc/requirements/requirements-pyqt.txt
|
2016-03-26 19:54:07 +01:00
|
|
|
commands =
|
|
|
|
{envbindir}/pyinstaller --noconfirm misc/qutebrowser.spec
|
|
|
|
|
2015-10-08 06:12:46 +02:00
|
|
|
[testenv:eslint]
|
2017-09-10 13:17:21 +02:00
|
|
|
# This is duplicated in travis_run.sh for Travis CI because we can't get tox in
|
|
|
|
# the JavaScript environment easily.
|
2017-12-06 20:58:14 +01:00
|
|
|
basepython = python3
|
2016-08-09 11:10:50 +02:00
|
|
|
deps =
|
2015-10-08 06:12:46 +02:00
|
|
|
whitelist_externals = eslint
|
2016-12-06 17:04:14 +01:00
|
|
|
changedir = {toxinidir}/qutebrowser/javascript
|
2017-09-29 22:29:18 +02:00
|
|
|
commands = eslint --color --report-unused-disable-directives .
|