Expand description
Assertions that fail with a rendered diff: assert_rich_eq!,
assert_rich_json_eq!, assert_render_eq! and
assert_snapshot_eq!.
The diff is unified unless RICH_ASSERT_LAYOUT=side-by-side. It is
coloured only when RICH_ASSERT_COLOR=1, or when stdout is a terminal and
CI is unset (RICH_ASSERT_COLOR=0 forces it off). Without colour the
output is plain ASCII: -/+/~ markers and a | divider.
Structs§
- Report
- How a failing assertion renders its diff.
Functions§
- assert_
json_ eq assert_rich_json_eq!’s body: both values as pretty JSON.- assert_
render_ eq assert_render_eq!’s body.- assert_
snapshot_ eq assert_snapshot_eq!’s body: the ANSI diff (style-only lines marked~) and the first differing field.- assert_
str_ eq assert_rich_eq!’s body.- render_
plain - Render
renderableatwidththrough a plain, deterministic target. Trailing whitespace on each line and trailing blank lines are dropped.