Updated
On this page
MockRenderer for recording render() calls and make_test_tool() for building a Tool that returns a fixed ToolOutput, both used across the tool test suite.
#tests.tool_test_helpers
#tests.tool_test_helpers
#MockRenderer
A renderer that records all render calls for testing.
#render
python
def render(self, data: Any) -> str#make_test_tool
python
def make_test_tool(name: str, return_value: str, renderer: Renderer[Any] | None=None) -> ToolCreate a Tool that returns a fixed ToolOutput.
The renderer parameter is accepted for future use but currently unused -- the return_value string is used directly as both ToolOutput.text and ToolOutput.data.