Repository: teamtomo/imodmodel (language: python)

Issue:
Tests are broken because pytest>=8.0.0 breaks pytest-lazy-fixture
`pytest==8.0.0` was released after the last test-and-deploy. It is incompatible with pytest-lazy-fixture (see https://github.com/TvoroG/pytest-lazy-fixture/issues/65), causing tests to fail. 

To reproduce:
```bash
conda create -n imodmodel_test python==3.11
conda activate imodmodel_test
git clone https://github.com/teamtomo/imodmodel.git
cd imodmodel
pip install ".[dev]"
pytest
```

Fails with: 
```
E   pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
E   Plugin: lazy-fixture, Hook: pytest_generate_tests
E   AttributeError: 'CallSpec2' object has no attribute 'funcargs'
E   For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning
```

As that plugin doesn't seem to be in development anymore it would likely be good to adopt any of the workarounds mentioned in that issue to fix the tests. 


Discussion / hints:

Fix patch:
diff --git a/pyproject.toml b/pyproject.toml
index 5b0b0ba..1a98b0a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -42,7 +42,6 @@ dev = [
     "pre-commit",
     "pytest-cov",
     "pytest",
-    "pytest-lazy-fixture",
     "rich",
     "ruff",
     "mkdocs-material",
@@ -104,7 +103,6 @@ extend-ignore = [
 [tool.hatch.envs.default]
 dependencies = [
   "pytest",
-  "pytest-lazy-fixture",
 ]
 
 [tool.hatch.envs.default.scripts]


Test patch:
diff --git a/tests/test_model_api.py b/tests/test_model_api.py
index b190725..b17d4d5 100644
--- a/tests/test_model_api.py
+++ b/tests/test_model_api.py
@@ -1,19 +1,26 @@
 import pytest
-from pytest_lazyfixture import lazy_fixture
-
 from imodmodel import ImodModel
-from imodmodel.models import Object, ObjectHeader, Contour, ContourHeader, Mesh, MeshHeader
+from imodmodel.models import (
+    Contour,
+    ContourHeader,
+    Mesh,
+    MeshHeader,
+    Object,
+    ObjectHeader,
+)
+
 
 @pytest.mark.parametrize(
-    "file, meshes_expected",
+    "file_fixture, meshes_expected",
     [
-        (lazy_fixture('two_contour_model_file'), 0),
-        (lazy_fixture('meshed_contour_model_file'), 1),
+        ('two_contour_model_file', 0),
+        ('meshed_contour_model_file', 1),
 
     ]
 )
-def test_read(file, meshes_expected):
+def test_read(file_fixture, meshes_expected, request):
     """Check the model based API"""
+    file = request.getfixturevalue(file_fixture)
     model = ImodModel.from_file(file)
     assert isinstance(model, ImodModel)
     assert len(model.objects) == 1