re-add missing fixture

This commit is contained in:
Florian Förster 2025-10-23 12:20:29 +02:00
parent 09f06cb632
commit 26563dcfde

View File

@ -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])