26 lines
1.0 KiB
Python
26 lines
1.0 KiB
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def test_detection_lab_surfaces_yolo_runtime_preflight() -> None:
|
|
lab = (ROOT / "frontend" / "src" / "components" / "detection" / "DetectionLab.tsx").read_text(
|
|
encoding="utf-8"
|
|
)
|
|
hook = (ROOT / "frontend" / "src" / "hooks" / "useDetectionWorkflow.ts").read_text(encoding="utf-8")
|
|
api = (ROOT / "frontend" / "src" / "services" / "api" / "detection.ts").read_text(encoding="utf-8")
|
|
types = (ROOT / "frontend" / "src" / "types.ts").read_text(encoding="utf-8")
|
|
app = (ROOT / "frontend" / "src" / "App.tsx").read_text(encoding="utf-8")
|
|
|
|
assert "YOLO runtime preflight" in lab
|
|
assert "torch_version" in lab
|
|
assert "ultralytics_version" in lab
|
|
assert "cuda_available" in lab
|
|
assert "onRefreshYoloPreflight" in lab
|
|
assert "loadYoloPreflight" in hook
|
|
assert "getYoloPreflight" in api
|
|
assert "/api/v1/detection/yolo/preflight" in api
|
|
assert "interface YoloPreflightResponse" in types
|
|
assert "yoloPreflight={yoloPreflight}" in app
|