Assertions¶
Custom assertion helpers for russo test results.
_assertions
¶
Custom assertion helpers for russo test results.
ToolCallAssertionError
¶
ToolCallAssertionError(result: EvalResult, message: str = '')
Bases: AssertionError
Rich assertion error with detailed tool call diff.
Source code in src/russo/_assertions.py
assert_tool_calls
¶
assert_tool_calls(result: EvalResult, *, message: str = '') -> None
Assert that an EvalResult passed.
Raises a ToolCallAssertionError with a rich diff if it didn't.
Usage
result = await russo.run(...) russo.assert_tool_calls(result)
Or with a custom message¶
russo.assert_tool_calls(result, message="Flight booking should work")