MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / test_complete_and_fail

Function test_complete_and_fail

tests/workflow/test_local_workflow.py:86–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84
85
86def test_complete_and_fail():
87 reg = RuntimeTaskRegistry()
88 s1 = _register(reg)
89 complete_workflow_task(s1.id, result={"ok": 1}, registry=reg)
90 done = reg.get(s1.id)
91 assert done.status == "completed"
92 assert done.result == {"ok": 1}
93 assert done.end_time is not None
94 assert done.evict_after is not None
95
96 s2 = _register(reg)
97 fail_workflow_task(s2.id, error="boom", registry=reg)
98 assert reg.get(s2.id).status == "failed"
99 assert reg.get(s2.id).error == "boom"
100
101
102def test_kill_aborts_the_run():

Callers

nothing calls this directly

Calls 5

getMethod · 0.95
RuntimeTaskRegistryClass · 0.90
complete_workflow_taskFunction · 0.90
fail_workflow_taskFunction · 0.90
_registerFunction · 0.70

Tested by

no test coverage detected