From 26563dcfde752400cf71e8bc8e85c39403956f6d Mon Sep 17 00:00:00 2001 From: foefl Date: Thu, 23 Oct 2025 12:20:29 +0200 Subject: [PATCH] re-add missing fixture --- tests/test_detection.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_detection.py b/tests/test_detection.py index d245d51..18874cd 100644 --- a/tests/test_detection.py +++ b/tests/test_detection.py @@ -1,4 +1,5 @@ import shutil +from pathlib import Path from unittest.mock import patch import numpy as np @@ -11,6 +12,17 @@ import dopt_sensor_anomalies.types as t from dopt_sensor_anomalies import constants, errors +@pytest.fixture(scope="module") +def single_img_path() -> Path: + img_folder = Path(__file__).parent / "_img" + if not img_folder.exists(): + raise FileNotFoundError("Img path not existing") + img_paths = tuple(img_folder.glob("*_12.bmp")) + if not img_paths: + raise ValueError("No images found") + return img_paths[0] + + def test_midpoint(): ptA = np.array([1.0, 2.0]) ptB = np.array([3.0, 4.0])