MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_execute_tools_parallel_callback_exception

Function test_execute_tools_parallel_callback_exception

tests/tools/test_execution.py:135–150  ·  view source on GitHub ↗

Test that callback exceptions don't break execution.

()

Source from the content-addressed store, hash-verified

133
134@pytest.mark.asyncio
135async 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

Callers

nothing calls this directly

Calls 2

execute_tools_parallelFunction · 0.90
MockToolManagerClass · 0.70

Tested by

no test coverage detected