smarie / python-pytest-steps

A tiny package to ease the creation of test steps with shared intermediate results/state.
https://smarie.github.io/python-pytest-steps/
BSD 3-Clause "New" or "Revised" License
56 stars 5 forks source link

`@cross_steps_fixture` does not wait for the last step to perform teardown #27

Open smarie opened 5 years ago

smarie commented 5 years ago

From reading the code I realize that there is nothing preventing pytest to execute the fixture teardown after the first step. So even if you decorate the fixture with @cross_steps_fixture, the value will be reused but it might be disfunctional.

Teardown hook should therefore be executed after all steps

Challenges: