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

Function test_register_task_is_idempotent

tests/test_task_registry.py:220–229  ·  view source on GitHub ↗

Re-registering the same Task implementation is a no-op.

()

Source from the content-addressed store, hash-verified

218
219
220def test_register_task_is_idempotent() -> None:
221 """Re-registering the same Task implementation is a no-op."""
222 from src.task_registry import register_task
223 from src.tasks.local_shell import LocalShellTask
224
225 before = len(get_all_tasks())
226 register_task(LocalShellTask())
227 register_task(LocalShellTask())
228 after = len(get_all_tasks())
229 assert after == before, "duplicate registrations should be ignored"

Callers

nothing calls this directly

Calls 3

get_all_tasksFunction · 0.90
register_taskFunction · 0.90
LocalShellTaskClass · 0.90

Tested by

no test coverage detected