Join GitHub today
Update documentation to reference that a parametrized fixture might be set up more than once in its scope. #4058
Right now, the fixture documentation states:
While this statement is true in that example that is given, it leads the user to believe that fixtures are always only generated once for the scope that they are passed.
While this behavior from pytest makes sense, I can't find any reference to this behavior in the fixture documentation, and it's surprising as the documentation led me to believe that a fixture would only be created once for the scope that it is being ran in.
Simple example that highlights the behavior I'm talking about:
And then when ran:
In this case, we see fix1 runs the setup for the param value 0 twice, which is not an obvious behavior from the documentation.