Test streaming handles errors gracefully.
()
| 319 | |
| 320 | @pytest.mark.asyncio |
| 321 | async def test_stream_execute_tools_with_error(): |
| 322 | """Test streaming handles errors gracefully.""" |
| 323 | manager = MockToolManager( |
| 324 | results={ |
| 325 | "failing_tool": ToolCallResult( |
| 326 | tool_name="failing_tool", |
| 327 | success=False, |
| 328 | error="tool failed", |
| 329 | ) |
| 330 | } |
| 331 | ) |
| 332 | |
| 333 | calls = [ |
| 334 | CTPToolCall(id="call_1", tool="failing_tool", arguments={}), |
| 335 | CTPToolCall(id="call_2", tool="success_tool", arguments={}), |
| 336 | ] |
| 337 | |
| 338 | results = [] |
| 339 | async for result in stream_execute_tools(manager, calls): |
| 340 | results.append(result) |
| 341 | |
| 342 | assert len(results) == 2 |
| 343 | |
| 344 | |
| 345 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected