Replace pytest-lazyfixture for pytest >= 8.0
mraspaud opened this issue · 2 comments
mraspaud commented
Pytest-lazyfixture does not support pytest >=8 and seems to be unmaintained.
A possible solution is to apply some of the fixes mentionned here:
TvoroG/pytest-lazy-fixture#65
verduijn commented
Would this be an acceptable implementation?
@pytest.mark.parametrize("some_lazy_fixture_string", ["fixture_1", "fixture_2"])
def test_function(some_lazy_fixture_string, request):
some_lazy_fixture_string = request.getfixturevalue(some_lazy_fixture_string)
...
The conftest.py
custom lazy_fixture
example seem a little magical, but that might just be my preference.