REPOSITORY
hada/greenhouse-transport-platform Private
[참조 MVP] 온실 이송 플랫폼 고도화 — 이송 플랫폼의 주행·적재·현장 실증 상태를 제공하는 위탁연구 참조 MVP입니다.
https://git.agrithing.ai/hada/greenhouse-transport-platform.git 314c1df feat: 온실 이송 플랫폼 고도화 구체 MVP 구현
4315384 ci: add static dynamic and evidence gates
35b4834 feat: add executable institution reference MVP
8e1eda4 docs: define product role and interface contract
1 items · feat/concrete-mvp-v2
·/ tests/test_component.py
python · 1.2 KB · 058afd6 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"], "hada/greenhouse-transport-platform") self.assertEqual(result["target"], "mcu") self.assertEqual(result["command"], "ENABLE_DRIVE") self.assertEqual(result["loadRatio"], 0.717) self.assertGreater(result["speedLimitMps"], 0.5) 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"], "hada/greenhouse-transport-platform") self.assertFalse(result["accepted"]) self.assertEqual(result["command"], "STOP") self.assertIn("EMERGENCY_STOP", result["blockingReasons"])if __name__ == "__main__": unittest.main()