A-SW Hub / Repositories
Local Gitea · READ ONLY
← 저장소 Repositories
REPOSITORY

via/greenhouse-fleet-control Private

[참조 MVP] 온실 이송로봇 서비스 관제 — UWB·SLAM 상태, 원격제어, UI와 OTA 작업을 연결하는 관제 참조 MVP입니다.

https://git.agrithing.ai/via/greenhouse-fleet-control.git
4 commits
1 items · feat/concrete-mvp-v2
·/ tests/test_component.py
python · 1.2 KB · a5e6ecc Download
from __future__ import annotationsimport jsonimport unittestfrom pathlib import Pathfrom asw_component import executeROOT = Path(__file__).resolve().parents[1]class ComponentTest(unittest.TestCase):    def test_reference_scenario(self):        payload = json.loads((ROOT / "examples/input.json").read_text(encoding="utf-8"))        result = execute(payload)        self.assertTrue(result["accepted"])        self.assertEqual(result["component"], "via/greenhouse-fleet-control")        self.assertEqual(result["target"], "service")        self.assertEqual(result["status"], "DISPATCHED")        self.assertEqual(result["fusedLocalization"], 0.897)        self.assertEqual(result["dispatch"]["mode"], "AUTONOMOUS")    def test_safety_or_failure_path(self):        payload = json.loads((ROOT / "examples/failure-input.json").read_text(encoding="utf-8"))        result = execute(payload)        self.assertEqual(result["component"], "via/greenhouse-fleet-control")        self.assertFalse(result["accepted"])        self.assertEqual(result["status"], "BLOCKED")        self.assertIn("LOCALIZATION_QUALITY", result["blockingReasons"])if __name__ == "__main__":    unittest.main()