From 74d6c139cf0097f2cffffd08615f2321c7dbb68a Mon Sep 17 00:00:00 2001 From: Alex Severin Date: Sat, 14 Dec 2024 23:53:12 +0300 Subject: [PATCH] add assert path.exists() for readable error --- tests/conftest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 7b3c638..1c8d4c1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,10 @@ import pytest +from pathlib import Path from microwink import SegModel @pytest.fixture def seg_model() -> SegModel: - return SegModel.from_path("./models/seg_model.onnx") + path = Path("./models/seg_model.onnx") + assert path.exists() + return SegModel.from_path(path)