scipp.testing.assertions#

Custom assertions for pytest-based tests.

To get the best error messages, tell pytest to rewrite assertions in this module. Place the following code in your conftest.py:

pytest.register_assert_rewrite('scipp.testing.assertions')

Functions

assert_allclose(a, b[, rtol, atol])

Raise an AssertionError if two objects don't have similar values or if their other properties are not identical.

assert_identical(a, b)

Raise an AssertionError if two objects are not identical.