summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2015-08-08 21:11:38 +0200
committerFlorian Bruhin <git@the-compiler.org>2015-08-08 22:33:29 +0200
commit3179455e69eca9c205450a1bbbe381ee1a593bbc (patch)
tree38c98be72c98511706db8e9a76a0fec57e0bcf62 /tox.ini
parent06a82c55664ec868f04a235ceeb182f3fb6f5e2e (diff)
downloadqutebrowser-3179455e69eca9c205450a1bbbe381ee1a593bbc.tar.gz
qutebrowser-3179455e69eca9c205450a1bbbe381ee1a593bbc.zip
Reorganize tox.ini.
- The environment to run unittests is now called py34 as that's the common thing used, and will also allow us to run the tests with Python 3.5. - The default tests now also run coverage.py and do a coverage check (on Linux). - The smoke tests are now part of the default environment.
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini85
1 files changed, 41 insertions, 44 deletions
diff --git a/tox.ini b/tox.ini
index df926ab5b..ef5b69430 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,23 +4,14 @@
# and then run "tox" from this directory.
[tox]
-envlist = smoke,unittests,misc,pep257,pyflakes,pep8,mccabe,pylint,pyroma,check-manifest
+envlist = smoke,py34,misc,pep257,pyflakes,pep8,mccabe,pylint,pyroma,check-manifest
[testenv]
-passenv = PYTHON
-basepython = python3
-
-[testenv:mkvenv]
-commands = {envpython} scripts/link_pyqt.py --tox {envdir}
-envdir = {toxinidir}/.venv
-usedevelop = true
-
-[testenv:unittests]
# https://bitbucket.org/hpk42/tox/issue/246/ - only needed for Windows though
setenv =
QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms
PYTEST_QT_API=pyqt5
-passenv = PYTHON DISPLAY XAUTHORITY HOME
+passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER
deps =
-r{toxinidir}/requirements.txt
py==1.4.30
@@ -31,15 +22,26 @@ deps =
pytest-html==1.3.2
hypothesis==1.10.1
hypothesis-pytest==0.15.1
+ coverage==3.7.1
+ pytest-cov==2.0.0
+ cov-core==1.15.0
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
- {envpython} -m py.test --strict -rfEsw {posargs:tests}
+ {envpython} -m py.test --strict -rfEsw --cov qutebrowser --cov-report html --cov-report xml --cov-report= {posargs:tests}
+ {envpython} scripts/dev/check_coverage.py
+ {envpython} -m qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ":later 500 quit"
+
+[testenv:mkvenv]
+basepython = python3
+commands = {envpython} scripts/link_pyqt.py --tox {envdir}
+envdir = {toxinidir}/.venv
+usedevelop = true
[testenv:unittests-watch]
-setenv = {[testenv:unittests]setenv}
-passenv = {[testenv:unittests]passenv}
+basepython = python3
+passenv = {[testenv]passenv}
deps =
- {[testenv:unittests]deps}
+ {[testenv]deps}
pytest-testmon==0.6
pytest-watch==3.2.0
commands =
@@ -47,40 +49,32 @@ commands =
{envdir}/bin/ptw -- --testmon --strict -rfEsw {posargs:tests}
[testenv:unittests-frozen]
-setenv = {[testenv:unittests]setenv}
-passenv = {[testenv:unittests]passenv}
+basepython = python3
+passenv = {[testenv]passenv}
skip_install = true
deps =
- {[testenv:unittests]deps}
+ {[testenv]deps}
cx_Freeze==4.3.4
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} scripts/dev/freeze_tests.py build_exe -b {envdir}/build
{envdir}/build/run-frozen-tests --strict -rfEsw {posargs}
-[testenv:coverage]
-passenv = PYTHON DISPLAY XAUTHORITY HOME
-deps =
- {[testenv:unittests]deps}
- coverage==3.7.1
- pytest-cov==2.0.0
- cov-core==1.15.0
-commands =
- {envpython} scripts/link_pyqt.py --tox {envdir}
- {envpython} -m py.test --strict -rfEswx -v --cov qutebrowser --cov-report term --cov-report html --cov-report xml {posargs:tests}
- {envpython} scripts/dev/check_coverage.py
-
[testenv:misc]
+basepython = python3
# For global .gitignore files
passenv = HOME
+deps =
commands =
{envpython} scripts/dev/misc_checks.py git
{envpython} scripts/dev/misc_checks.py vcs
{envpython} scripts/dev/misc_checks.py spelling
[testenv:pylint]
+basepython = python3
skip_install = true
setenv = PYTHONPATH={toxinidir}/scripts/dev
+passenv =
deps =
-r{toxinidir}/requirements.txt
astroid==1.3.8
@@ -95,9 +89,10 @@ commands =
{envpython} scripts/dev/run_pylint_on_tests.py --rcfile=.pylintrc --output-format=colorized --reports=no --expected-line-ending-format=LF
[testenv:pep257]
+basepython = python3
skip_install = true
-deps = pep257==0.6.0
passenv = PYTHON LANG
+deps = pep257==0.6.0
# Disabled checks:
# D102: Missing docstring in public method (will be handled by others)
# D103: Missing docstring in public function (will be handled by others)
@@ -106,8 +101,10 @@ passenv = PYTHON LANG
commands = {envpython} -m pep257 scripts tests qutebrowser --ignore=D102,D103,D209,D402 '--match=(?!resources|test_*).*\.py'
[testenv:pyflakes]
+basepython = python3
# https://github.com/fschulze/pytest-flakes/issues/6
setenv = LANG=en_US.UTF-8
+passenv =
deps =
-r{toxinidir}/requirements.txt
py==1.4.30
@@ -119,6 +116,8 @@ commands =
{envpython} -m py.test -q --flakes --ignore=tests
[testenv:pep8]
+basepython = python3
+passenv =
deps =
-r{toxinidir}/requirements.txt
py==1.4.30
@@ -130,6 +129,8 @@ commands =
{envpython} -m py.test -q --pep8 --ignore=tests
[testenv:mccabe]
+basepython = python3
+passenv =
deps =
-r{toxinidir}/requirements.txt
py==1.4.30
@@ -141,7 +142,9 @@ commands =
{envpython} -m py.test -q --mccabe --ignore=tests
[testenv:pyroma]
+basepython = python3
skip_install = true
+passenv =
deps =
pyroma==1.8.2
docutils==0.12
@@ -150,7 +153,9 @@ commands =
{envdir}/bin/pyroma .
[testenv:check-manifest]
+basepython = python3
skip_install = true
+passenv =
deps =
check-manifest==0.25
commands =
@@ -158,8 +163,10 @@ commands =
{envdir}/bin/check-manifest --ignore 'qutebrowser/git-commit-id,qutebrowser/html/doc,qutebrowser/html/doc/*,*/__pycache__'
[testenv:docs]
+basepython = python3
skip_install = true
whitelist_externals = git
+passenv =
deps =
-r{toxinidir}/requirements.txt
commands =
@@ -168,22 +175,12 @@ commands =
git --no-pager diff --exit-code --stat
{envpython} scripts/asciidoc2html.py {posargs}
-[testenv:smoke]
-# https://bitbucket.org/hpk42/tox/issue/246/ - only needed for Windows though
-setenv = QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms
-passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER
-deps =
- -r{toxinidir}/requirements.txt
-commands =
- {envpython} scripts/link_pyqt.py --tox {envdir}
- {envpython} -m qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ":later 500 quit"
-
[testenv:smoke-frozen]
-setenv = {[testenv:smoke]setenv}
-passenv = {[testenv:smoke]passenv}
+basepython = python3
+passenv = {[testenv]passenv}
skip_install = true
deps =
- {[testenv:smoke]deps}
+ {[testenv]deps}
cx_Freeze==4.3.4
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}