pytroll/satpy

Replace pytest-lazyfixture for pytest >= 8.0

mraspaud opened this issue · 2 comments

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

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.

Hm this was actually fixed a while ago in #2801 but it looks like the issue never got closed.