Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
indirect=True in parametrize breaks fixture scopes #570
The following test:
Looks like it sets the fixture up for each test method of class independently.
Another case of the same issue.
The intention was to allow
However, when the tests is run:
FWIW the original example now works as expected in the latest version:
This is related to #3551: pytest tries to follow some logic to minimize the number of session/class/module scoped fixture it creates between each test, but it can't always guess correctly. I think we should also update the docs to explain that