REPOSITORY
cnu/worker-gesture-perception Private
[참조 MVP] 작업자·제스처 인지 — 작업자 추적과 정지·호출 제스처를 구조화하는 참조 MVP입니다.
https://git.agrithing.ai/cnu/worker-gesture-perception.git dde583d feat: 작업자·제스처 인지 구체 MVP 구현
91ffdb9 ci: add static dynamic and evidence gates
789af9d feat: add executable institution reference MVP
aea3bf9 docs: define product role and interface contract
1 items · feat/concrete-mvp-v2
·/ tests/test_component.py
python · 1.1 KB · 5a0b884 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"], "cnu/worker-gesture-perception") self.assertEqual(result["target"], "vpu") self.assertEqual(result["selectedWorker"]["id"], "worker-04") self.assertEqual(result["command"], "FOLLOW_WORKER") self.assertFalse(result["stopRequired"]) 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"], "cnu/worker-gesture-perception") self.assertFalse(result["accepted"]) self.assertEqual(result["status"], "NO_WORKER") self.assertEqual(result["command"], "WAIT")if __name__ == "__main__": unittest.main()