fierce-park-88503
11/05/2018, 10:18 PMyield could be a return in this case I think. but it wouldn’t make it an iterator, pytest.fixture does some context-managery stuff for you, so you can do like:
@pytest.fixture
def thingy():
# prepare a_thing
yield a_thing
# clean up a_thing
https://docs.pytest.org/en/latest/fixture.html#fixture-finalization-executing-teardown-code