difference between fixture and yield_fixture in pytest
The only difference is in readability. I think (though I’m not 100% sure) the underlying behavior is identical (i.e. the cleanup after the yield statement is run as a finalizer). I always prefer using yield fixtures for cleanup, since it’s more readable. If you’re using pytest <3.0, you’ll still need to use pytest.yield_fixture to get … Read more