You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, I think I've just now realized what your use case :) Do you want to parametrize test with some data from db? If so, it's not quite possible. When pytest.mark.parametrize wants to iterate through your data (argument values), pytest_django autouse fixtures are not yet executed, so there is no even test db.
This does work now:
But it's not quite what I need. The fixture
needs_db
returns a list and I'd like to parametrizetest_some
with that list:This fails:
TypeError: 'LazyFixture' object is not iterable
Is it possible to support this use case? I'm not familiar with pytest's internals. :/
The text was updated successfully, but these errors were encountered: