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

Function test_list_output

tests/test_tasks_command.py:67–79  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

65# t2 = SYNTHETIC `.value`-bearing object to exercise the defensive _coerce branch.
66# --------------------------------------------------------------------------- #
67async def test_list_output(tmp_path):
68 tasks = [
69 _task("t1", "local_shell", "running", "build the thing"),
70 _task("t2", SimpleNamespace(value="agent"), SimpleNamespace(value="done"), ""),
71 ]
72 out = await TASKS_COMMAND.run("", _ctx(tmp_path, ui=NullUIHost(), tasks=tasks))
73 assert isinstance(out, InteractiveOutcome)
74 assert out.message == (
75 "Background tasks:\n"
76 "• [running] build the thing (id: t1)\n"
77 "• [done] agent (id: t2)" # description empty → falls back to coerced type
78 )
79 assert out.display == "system"
80
81
82async def test_empty_registry(tmp_path):

Callers

nothing calls this directly

Calls 4

NullUIHostClass · 0.90
_taskFunction · 0.85
_ctxFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected