Test that callback exceptions don't break execution.
()
| 133 | |
| 134 | @pytest.mark.asyncio |
| 135 | async def test_execute_tools_parallel_callback_exception(): |
| 136 | """Test that callback exceptions don't break execution.""" |
| 137 | manager = MockToolManager() |
| 138 | |
| 139 | async def failing_callback(call: CTPToolCall): |
| 140 | raise ValueError("callback error") |
| 141 | |
| 142 | calls = [CTPToolCall(id="call_1", tool="test_tool", arguments={})] |
| 143 | |
| 144 | # Should not raise, just log warning |
| 145 | results = await execute_tools_parallel( |
| 146 | manager, calls, on_tool_start=failing_callback |
| 147 | ) |
| 148 | |
| 149 | assert len(results) == 1 |
| 150 | assert results[0].is_success |
| 151 | |
| 152 | |
| 153 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected