pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.06k stars 292 forks source link

Replace pytest-lazyfixture for pytest >= 8.0 #2732

Closed mraspaud closed 3 months ago

mraspaud commented 8 months ago

Pytest-lazyfixture does not support pytest >=8 and seems to be unmaintained.

A possible solution is to apply some of the fixes mentionned here: https://github.com/TvoroG/pytest-lazy-fixture/issues/65

verduijn commented 3 months ago

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.

djhoese commented 3 months ago

Hm this was actually fixed a while ago in https://github.com/pytroll/satpy/pull/2801 but it looks like the issue never got closed.