## assert_table_equal()


Assert that `actual` matches `expected`, for use in tests.


Usage

``` python
assert_table_equal(
    actual,
    expected,
    *,
    rel_tol=_UNSET,
    max_rows=10,
    **kwargs,
)
```


Runs `diff_table(expected, actual, ...)`, with `expected` as the benchmark, and raises `AssertionError` with [diff_summary()](diff_summary.md#dazdiff.diff_summary) and the first `max_rows` records that differ. Tables that share no key fail too. Other keyword arguments go to [diff_table()](diff_table.md#dazdiff.diff_table).

`rel_tol` defaults to `sqrt(eps)` (about 1.5e-8), as pytest and testthat compare floats, where [diff_table()](diff_table.md#dazdiff.diff_table) is exact; with `duplicates="aggregate"`, which compares exactly, it defaults to 0. Repeated keys of rows with measures are a [DiffError](DiffError.md#dazdiff.DiffError) unless `duplicates` is given: an assertion must not decide identity by arrival order. Repeated whole rows are paired, since they are identical.

Returns the comparison when the tables match.
