diff --git a/tests/test_models.py b/tests/test_models.py index e43ceced228fea504a8beb0232661bcaff33bff1..1e3beda20e72a3a095ade34f86034bb6af0aee47 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -4,6 +4,7 @@ import os import pytest from huggingface_hub.utils import RepositoryNotFoundError, RevisionNotFoundError +from pytest_lazy_fixtures import lf as lazy_fixture from doc_ufcn import models @@ -16,7 +17,7 @@ from doc_ufcn import models "generic-page", "main", "~/.cache/doc-ufcn/models/generic-page/models--Teklia--doc-ufcn-generic-page/snapshots/ef5519d77baa190bfe294ad3994146dbe7e72095", - pytest.lazy_fixture("test_parameters"), + lazy_fixture("test_parameters"), True, ), # Correct fullname and version @@ -24,7 +25,7 @@ from doc_ufcn import models "doc-ufcn-generic-page", "main", "~/.cache/doc-ufcn/models/generic-page/models--Teklia--doc-ufcn-generic-page/snapshots/ef5519d77baa190bfe294ad3994146dbe7e72095", - pytest.lazy_fixture("test_parameters"), + lazy_fixture("test_parameters"), True, ), # Correct name and incorrect version @@ -34,7 +35,7 @@ from doc_ufcn import models "generic-page", None, "~/.cache/doc-ufcn/models/generic-page/models--Teklia--doc-ufcn-generic-page/snapshots/ef5519d77baa190bfe294ad3994146dbe7e72095", - pytest.lazy_fixture("test_parameters"), + lazy_fixture("test_parameters"), True, ), # Incorrect name and incorrect version diff --git a/tests/test_prediction.py b/tests/test_prediction.py index 51e1c9950691af00c1438e4d70528f920e0f47df..a13fde986be19e135e38d1ff144a8cd0c6ac504e 100644 --- a/tests/test_prediction.py +++ b/tests/test_prediction.py @@ -2,6 +2,7 @@ import numpy as np import pytest +from pytest_lazy_fixtures import lf as lazy_fixture from doc_ufcn import prediction @@ -313,8 +314,8 @@ def test_resize_predicted_polygons( ( {1: []}, None, - pytest.lazy_fixture("test_image"), - pytest.lazy_fixture("test_image"), + lazy_fixture("test_image"), + lazy_fixture("test_image"), ), ( { @@ -357,8 +358,8 @@ def test_resize_predicted_polygons( ], }, None, - pytest.lazy_fixture("test_image"), - pytest.lazy_fixture("test_masked_image"), + lazy_fixture("test_image"), + lazy_fixture("test_masked_image"), ), ], ) diff --git a/tox.ini b/tox.ini index 5c7028009e28bfae93b3b2f7f97e5d07dc6f39f8..7b9cee3390aa055b128f6571e58dae02ffe228ac 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ commands = deps = pytest - pytest-lazy-fixture + pytest-lazy-fixtures -rrequirements.txt -rtraining-requirements.txt -rtest-requirements.txt