generated from dopt-python/py311
re-add missing fixture
This commit is contained in:
parent
09f06cb632
commit
26563dcfde
@ -1,4 +1,5 @@
|
|||||||
import shutil
|
import shutil
|
||||||
|
from pathlib import Path
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -11,6 +12,17 @@ import dopt_sensor_anomalies.types as t
|
|||||||
from dopt_sensor_anomalies import constants, errors
|
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():
|
def test_midpoint():
|
||||||
ptA = np.array([1.0, 2.0])
|
ptA = np.array([1.0, 2.0])
|
||||||
ptB = np.array([3.0, 4.0])
|
ptB = np.array([3.0, 4.0])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user