summaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorCalum Lind <calumlind@gmail.com>2017-12-17 10:55:44 +0000
committerCalum Lind <calumlind@gmail.com>2017-12-17 11:55:09 +0000
commit4982ba0b9865ea63e4e0be9928fb4a874dfdbe0f (patch)
tree369a96a8c0cd0c39cbfeed0236c052e6fbd8a423 /tox.ini
parentf57286fd5164b363e64460a7bca1e64643426ba0 (diff)
downloaddeluge-4982ba0b9865ea63e4e0be9928fb4a874dfdbe0f.tar.gz
deluge-4982ba0b9865ea63e4e0be9928fb4a874dfdbe0f.tar.bz2
deluge-4982ba0b9865ea63e4e0be9928fb4a874dfdbe0f.zip
Cleanup pytest config in tox
Config values are either wrong, unused or default is better. Disable logging of deluge log output in testing. Newer versions of pytest now use `pytest` cmd so rename.
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini31
1 files changed, 13 insertions, 18 deletions
diff --git a/tox.ini b/tox.ini
index 404eab916..16e5bb0c5 100644
--- a/tox.ini
+++ b/tox.ini
@@ -31,16 +31,12 @@ deps =
mock
slimit
pillow
-whitelist_externals = py.test
+whitelist_externals = pytest
commands = {envpython} setup.py test
[pytest]
-python_functions = test_
-norecursedirs = .tox .git dist build
-pep8maxlinelength = 120
-whitelist_externals= {[testenv]whitelist_externals}
-commands = py.test --basetemp=_pytest_temp deluge
-
+# Hide logged warnings and errors in test output.
+log_cli_level = CRITICAL
##############
# Unit tests
@@ -49,13 +45,13 @@ commands = py.test --basetemp=_pytest_temp deluge
[testenv:pydef]
commands =
python -c "import libtorrent as lt; print(lt.__version__)"
- py.test -v --basetemp=_pytest_temp -s -m "not (todo or gtkui)" deluge/tests
+ pytest -v --basetemp=_pytest_temp -s -m "not (todo or gtkui)" deluge/tests
[testenv:pygtkui]
-commands = py.test -v --basetemp=_pytest_temp -s -m "gtkui" deluge/tests
+commands = pytest -v --basetemp=_pytest_temp -s -m "gtkui" deluge/tests
[testenv:todo]
-commands = py.test -v --basetemp=_pytest_temp -s -m "todo" deluge/tests
+commands = pytest -v --basetemp=_pytest_temp -s -m "todo" deluge/tests
[testenv:trial]
setenv = {[testenv]setenv}:{env:PWD}/deluge/tests
@@ -67,13 +63,13 @@ commands =
setenv = PYTHONPATH = {env:PWD}:{env:PWD}/deluge/plugins
commands =
python setup.py build_plugins --develop --install-dir={env:PWD}/deluge/plugins/
- py.test -v --basetemp=_pytest_temp -s -m "not gtkui" deluge/plugins
+ pytest -v --basetemp=_pytest_temp -s -m "not gtkui" deluge/plugins
[testenv:pluginsgtkui]
setenv = PYTHONPATH = {env:PWD}:{env:PWD}/deluge/plugins
commands =
python setup.py build_plugins --develop --install-dir={env:PWD}/deluge/plugins/
- py.test -v --basetemp=_pytest_temp -s deluge/plugins
+ pytest -v --basetemp=_pytest_temp -s deluge/plugins
[testenv:py27]
deps =
@@ -119,13 +115,12 @@ ignore_errors = True
deps =
{[testenv]deps}
pylint
-# Use bash to enable use of wildcard paths with pylint.
-whitelist_externals = bash
commands =
pylint --version
pylint deluge
- bash -c 'pylint *.py deluge/scripts/*.py'
- bash -c 'pylint deluge/plugins/*/deluge/'
+# Use python to enable use of wildcard paths with pylint.
+ python -m pylint *.py deluge/scripts/*.py
+ python -m pylint deluge/plugins/*/deluge/
######################
@@ -140,7 +135,7 @@ 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 pytest -m "not todo" deluge/tests/
[testenv:testcoverage]
setenv = {[testenv]setenv}
@@ -201,4 +196,4 @@ whitelist_externals =
commands =
mkdir -p build/doccoverage
sphinx-build -W -b coverage -d build/doctrees source build/doccoverage
- py.test --doctest-glob='*.rst'
+ pytest --doctest-glob='*.rst'