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.
This commit is contained in:
parent
f57286fd51
commit
4982ba0b98
31
tox.ini
31
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'
|
||||
|
|
Loading…
Reference in New Issue