In pytest, how can I abort the fixture teardown?

Our pytest environment has a lot of fixtures (mostly scope=’function’ and scope=’module’) that are doing something of the form: @pytest.yield_fixture(scope=’function’) def some_fixture(): … some object initialization … yield some_object … teardown … We use the teardown phase of the fixture (after the yield) to delete some resources created specifically for the test. However, if a…

Details