Replies: 1 comment
-
There is the related (unresolved) feature request #3393, which mentions a plugin that shall be able to prioritize fixtures (haven't tested it). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm currently maintaining a collaborative large pytest project, I wanted to add a sort of 'state assurance' mechanizem to assert that every test function\class does not change the 'state' of the server (from different angles) ,
In other words I just want to run a function after each test.
At first, we added a simple
autoused
class scope fixture` that yields and then runs the assert function, with worked fine but added a lot of overhead after each test.Now we want to change the fixture scope to 'module' but since the fixture it autoused, the assert function runs before all the other other module fixture teardown,
Is there a way to customize a module teardown? Or is there a way to 'force' a fixture to run last?
Thanks
Yuval
Beta Was this translation helpful? Give feedback.
All reactions