[Tests] Consistent tox config layout

This commit is contained in:
Calum Lind 2016-04-07 19:11:32 +01:00
parent 9d13234e23
commit 0b17b52c9a

38
tox.ini
View File

@ -1,7 +1,7 @@
# 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 (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.
#
# Usage: `pip install tox` and then run `tox` from this directory.
[flake8]
max-line-length = 120
@ -49,18 +49,15 @@ commands =
py.test -v -s -m "not (todo or gtkui)" deluge/tests
[testenv:pygtkui]
commands =
py.test -v -s -m "gtkui" deluge/tests
commands = py.test -v -s -m "gtkui" deluge/tests
[testenv:todo]
commands =
py.test -v -s -m "todo" deluge/tests
commands = py.test -v -s -m "todo" deluge/tests
[testenv:trial]
setenv = {[testenv]setenv}:{env:PWD}/deluge/tests
whitelist_externals = trial
commands =
trial --reporter=deluge-reporter deluge/tests
commands = trial --reporter=deluge-reporter deluge/tests
[testenv:plugins]
commands = py.test deluge/plugins
@ -122,20 +119,19 @@ deps =
whitelist_externals =
{[testenv]whitelist_externals}
coverage
commands =
coverage run --branch --source=deluge -m py.test -m "not todo" deluge/tests/
commands = coverage run --branch --source=deluge -m py.test -m "not todo" deluge/tests/
[testenv:testcoverage]
deps = {[testcoveragebase]deps}
setenv = {[testenv]setenv}
deps = {[testcoveragebase]deps}
whitelist_externals = {[testcoveragebase]whitelist_externals}
commands =
{[testcoveragebase]commands}
coverage report
[testenv:testcoverage-html]
deps = {[testcoveragebase]deps}
setenv = {[testenv]setenv}
deps = {[testcoveragebase]deps}
whitelist_externals = {[testcoveragebase]whitelist_externals}
commands =
{[testcoveragebase]commands}
@ -154,35 +150,35 @@ commands =
sitepackages = False
changedir = docs
install_command = pip install {opts} {packages}
whitelist_externals =
{[testenv]whitelist_externals}
sphinx-build
deps =
{[testenv]deps}
sphinx
sphinxcontrib-napoleon
pillow
whitelist_externals =
{[testenv]whitelist_externals}
sphinx-build
commands = sphinx-build -E -W -b html -d build/doctrees source build/html
[testenv:docs]
sitepackages = {[docsbase]sitepackages}
changedir = {[docsbase]changedir}
install_command = {[docsbase]install_command}
whitelist_externals = {[docsbase]whitelist_externals}
deps = {[docsbase]deps}
whitelist_externals = {[docsbase]whitelist_externals}
commands = sphinx-build -v -E -T -b html -d build/doctrees source build/html
[testenv:docscoverage]
sitepackages = {[docsbase]sitepackages}
changedir = {[docsbase]changedir}
install_command = {[docsbase]install_command}
whitelist_externals =
{[docsbase]whitelist_externals}
mkdir
deps =
{[docsbase]deps}
coverage
pytest-cov
whitelist_externals =
{[docsbase]whitelist_externals}
mkdir
commands =
mkdir -p build/doccoverage
sphinx-build -W -b coverage -d build/doctrees source build/doccoverage