Orchestrata Ultimate › Tests › Reference › agents › test_lifecycle_real

Tests reference — tests/agents/test_lifecycle_real.py

Module of tests/agents, split out because the directory page would be too large.

Prose pending.

tests/agents/test_lifecycle_real.py

source · 20 tests · 244 lines

Real tests for agents.lifecycle — formal spawn/terminate with constraints.

Covers: agents.hierarchy, agents.lifecycle, agents.types

Kind Name Line Description
function test_lifespan_type_enum_values 17
function test_lifecycle_state_to_dict 23
function test_lifecycle_error 38
function test_spawn_without_runtime_creates_stub 43
function test_spawn_constraint_violation_raises 53
function test_spawn_with_parent_adds_to_hierarchy 59
function test_spawn_without_parent_adds_as_root 71
function test_spawn_parent_missing_raises 82
function test_terminate_with_cleanup 92
function test_terminate_cascades_to_children 106
function test_check_lifespan_within_ttl 123
function test_check_lifespan_unknown_agent 137
function test_check_lifespan_no_ttl_persistent 142
function test_handle_failure_updates_state 156
function test_handle_failure_unknown_agent_logs_only 169
function test_get_all_states 175
function test_active_count 182
function test_spawn_with_runtime 212
function test_terminate_with_runtime_failure_still_succeeds 222
function test_spawn_hierarchy_failure_rolls_back_runtime 234
class TestableRuntime 188 Tiny async runtime stand-in that doesn't need Prolog.