Not using indirect
in parametrize
causes module-scoped fixtures to be called multiple times
#3678
Labels
topic: fixtures
anything involving fixtures directly or indirectly
topic: parametrize
related to @pytest.mark.parametrize
type: bug
problem that needs to be addressed
In the following example:
...I'd expect both tests to pass. However:
If
test_fixture_with_params
is supposed to call the fixture twice, I think this may be at least a documentation issue, since the behaviour is surprising?Alternatively, if this form of parameterizing fixtures is incorrect, should it be an error?
Or should
fixture_with_params
only have been called once, and this is a bug?The text was updated successfully, but these errors were encountered: