(tmp_path)
| 65 | # t2 = SYNTHETIC `.value`-bearing object to exercise the defensive _coerce branch. |
| 66 | # --------------------------------------------------------------------------- # |
| 67 | async 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 | |
| 82 | async def test_empty_registry(tmp_path): |
nothing calls this directly
no test coverage detected