tests: Use pytest-warnings to handle warnings

This commit is contained in:
Florian Bruhin 2016-07-27 18:27:32 +02:00
parent 1ebf2bab1c
commit 7605a4fb0c
4 changed files with 3 additions and 8 deletions

View File

@ -26,6 +26,7 @@ pytest-qt==1.11.0
pytest-repeat==0.3.0
pytest-rerunfailures==2.0.0
pytest-travis-fold==1.2.0
pytest-warnings==0.1.0
pytest-xvfb==0.2.0
six==1.10.0
vulture==0.10

View File

@ -15,6 +15,7 @@ pytest-qt
pytest-repeat
pytest-rerunfailures
pytest-travis-fold
pytest-warnings
pytest-xvfb
vulture

View File

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

View File

@ -133,13 +133,6 @@ def qapp(qapp):
return qapp
@pytest.yield_fixture(autouse=True)
def fail_tests_on_warnings():
warnings.simplefilter('error')
yield
warnings.resetwarnings()
def pytest_addoption(parser):
parser.addoption('--qute-delay', action='store', default=0, type=int,
help="Delay between qutebrowser commands.")