MCPcopy Index your code
hub / github.com/google/adk-python / test_node_error_propagates

Function test_node_error_propagates

tests/unittests/runners/test_runner_node.py:171–183  ·  view source on GitHub ↗

A node that raises propagates the exception to the caller.

()

Source from the content-addressed store, hash-verified

169
170@pytest.mark.asyncio
171async def test_node_error_propagates():
172 """A node that raises propagates the exception to the caller."""
173
174 class _Node(BaseNode):
175
176 async def _run_impl(
177 self, *, ctx: Context, node_input: Any
178 ) -> AsyncGenerator[Any, None]:
179 raise RuntimeError('node failure')
180 yield # pylint: disable=unreachable
181
182 with pytest.raises(RuntimeError, match='node failure'):
183 await _run_node(_Node(name='error'))
184
185
186@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 2

_run_nodeFunction · 0.85
_NodeClass · 0.70

Tested by

no test coverage detected