(
expected_conversation: list[Message], agent_runner: TestRunner
)
| 36 | |
| 37 | |
| 38 | def assert_agent_says_in_order( |
| 39 | expected_conversation: list[Message], agent_runner: TestRunner |
| 40 | ): |
| 41 | expected_conversation_idx = len(expected_conversation) - 1 |
| 42 | for event in reversed(agent_runner.get_events()): |
| 43 | if event.content.parts and event.content.parts[0].text: |
| 44 | assert ( |
| 45 | event.author |
| 46 | == expected_conversation[expected_conversation_idx]['agent_name'] |
| 47 | ) |
| 48 | assert ( |
| 49 | event.content.parts[0].text.strip() |
| 50 | == expected_conversation[expected_conversation_idx]['expected_text'] |
| 51 | ) |
| 52 | expected_conversation_idx -= 1 |
| 53 | if expected_conversation_idx < 0: |
| 54 | return |
| 55 | |
| 56 | |
| 57 | def assert_agent_transfer_path( |
nothing calls this directly
no test coverage detected