Move pytest arguments to pytest.ini.

Closes #1260.
This commit is contained in:
Florian Bruhin 2016-01-24 21:10:22 +01:00
parent 95fe54f010
commit e9662b71f0
3 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,6 @@
[pytest] [pytest]
norecursedirs = .tox .venv norecursedirs = .tox .venv
addopts = --strict -rfEsw --faulthandler-timeout=70 --instafail
markers = markers =
gui: Tests using the GUI (e.g. spawning widgets) gui: Tests using the GUI (e.g. spawning widgets)
posix: Tests which only can run on a POSIX OS. posix: Tests which only can run on a POSIX OS.

View File

@ -26,6 +26,9 @@ import pytest
import pytestqt.plugin import pytestqt.plugin
import pytest_mock import pytest_mock
import pytest_catchlog import pytest_catchlog
import pytest_instafail
import pytest_faulthandler
sys.exit(pytest.main(plugins=[pytestqt.plugin, pytest_mock, sys.exit(pytest.main(plugins=[pytestqt.plugin, pytest_mock,
pytest_catchlog])) pytest_catchlog, pytest_instafail,
pytest_faulthandler]))

10
tox.ini
View File

@ -46,7 +46,7 @@ deps =
cherrypy==4.0.0 cherrypy==4.0.0
commands = commands =
{envpython} scripts/link_pyqt.py --tox {envdir} {envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} -m py.test --strict -rfEsw --faulthandler-timeout=70 --instafail {posargs:tests} {envpython} -m py.test {posargs:tests}
[testenv:py35-cov] [testenv:py35-cov]
basepython = python3.5 basepython = python3.5
@ -55,7 +55,7 @@ passenv = {[testenv]passenv}
deps = {[testenv]deps} deps = {[testenv]deps}
commands = commands =
{envpython} scripts/link_pyqt.py --tox {envdir} {envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} -m py.test --strict -rfEsw --faulthandler-timeout=70 --instafail --cov --cov-report xml --cov-report=html --cov-report= {posargs:tests} {envpython} -m py.test --cov --cov-report xml --cov-report=html --cov-report= {posargs:tests}
{envpython} scripts/dev/check_coverage.py {posargs} {envpython} scripts/dev/check_coverage.py {posargs}
[testenv:py34-cov] [testenv:py34-cov]
@ -65,7 +65,7 @@ passenv = {[testenv]passenv}
deps = {[testenv]deps} deps = {[testenv]deps}
commands = commands =
{envpython} scripts/link_pyqt.py --tox {envdir} {envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} -m py.test --strict -rfEsw --faulthandler-timeout=70 --instafail --cov --cov-report xml --cov-report=html --cov-report= {posargs:tests} {envpython} -m py.test --cov --cov-report xml --cov-report=html --cov-report= {posargs:tests}
{envpython} scripts/dev/check_coverage.py {posargs} {envpython} scripts/dev/check_coverage.py {posargs}
[testenv:mkvenv] [testenv:mkvenv]
@ -87,7 +87,7 @@ deps =
commands = commands =
{envpython} scripts/link_pyqt.py --tox {envdir} {envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} scripts/dev/freeze_tests.py build_exe -b {envdir}/build {envpython} scripts/dev/freeze_tests.py build_exe -b {envdir}/build
{envdir}/build/run-frozen-tests --strict -rfEsw {posargs} {envdir}/build/run-frozen-tests {posargs}
[testenv:unittests-nodisp] [testenv:unittests-nodisp]
basepython = python3 basepython = python3
@ -98,7 +98,7 @@ setenv =
QUTE_NO_DISPLAY=1 QUTE_NO_DISPLAY=1
commands = commands =
{envpython} scripts/link_pyqt.py --tox {envdir} {envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} -m py.test --strict -rfEw {posargs:tests} {envpython} -m py.test {posargs:tests}
[testenv:misc] [testenv:misc]
ignore_errors = true ignore_errors = true