From e9662b71f0a31f9695034a6ca1b67c9be85670b4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 24 Jan 2016 21:10:22 +0100 Subject: [PATCH] Move pytest arguments to pytest.ini. Closes #1260. --- pytest.ini | 1 + scripts/dev/run_frozen_tests.py | 5 ++++- tox.ini | 10 +++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pytest.ini b/pytest.ini index fee4cd9ef..10d0f6993 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,6 @@ [pytest] norecursedirs = .tox .venv +addopts = --strict -rfEsw --faulthandler-timeout=70 --instafail markers = gui: Tests using the GUI (e.g. spawning widgets) posix: Tests which only can run on a POSIX OS. diff --git a/scripts/dev/run_frozen_tests.py b/scripts/dev/run_frozen_tests.py index 64a2a7bbc..09782109b 100644 --- a/scripts/dev/run_frozen_tests.py +++ b/scripts/dev/run_frozen_tests.py @@ -26,6 +26,9 @@ import pytest import pytestqt.plugin import pytest_mock import pytest_catchlog +import pytest_instafail +import pytest_faulthandler sys.exit(pytest.main(plugins=[pytestqt.plugin, pytest_mock, - pytest_catchlog])) + pytest_catchlog, pytest_instafail, + pytest_faulthandler])) diff --git a/tox.ini b/tox.ini index 1479bfdba..f31421a53 100644 --- a/tox.ini +++ b/tox.ini @@ -46,7 +46,7 @@ deps = cherrypy==4.0.0 commands = {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] basepython = python3.5 @@ -55,7 +55,7 @@ passenv = {[testenv]passenv} deps = {[testenv]deps} commands = {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} [testenv:py34-cov] @@ -65,7 +65,7 @@ passenv = {[testenv]passenv} deps = {[testenv]deps} commands = {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} [testenv:mkvenv] @@ -87,7 +87,7 @@ deps = 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} + {envdir}/build/run-frozen-tests {posargs} [testenv:unittests-nodisp] basepython = python3 @@ -98,7 +98,7 @@ setenv = QUTE_NO_DISPLAY=1 commands = {envpython} scripts/link_pyqt.py --tox {envdir} - {envpython} -m py.test --strict -rfEw {posargs:tests} + {envpython} -m py.test {posargs:tests} [testenv:misc] ignore_errors = true