Closed
Description
pytest seems to silently ignore any exception inside fixtures.
import pytest
@pytest.yield_fixture(scope='session', autouse=True)
def my_fixture():
print "inside fixture"
raise Exception("oh dear")
yield
def test_foo():
assert True
Running this with py.test exception.py -s
gives:
exception.py inside fixture
.
================================================ 1 passed in 0.01 seconds =================================================
I would expect py.test to at least warn me that my fixture threw an error.