scipp.testing.assertions.assert_identical#
- scipp.testing.assertions.assert_identical(a, b)#
Raise an AssertionError if two objects are not identical.
For Scipp objects,
assert_identical(a, b)
is equivalent toassert sc.identical(a, b, equal_nan=True)
but produces a more precise error message in pytest. If this function is called with arguments that are not supported byscipp.identical()
, it callsassert a == b
.This function requires exact equality including equal types. For example,
assert_identical(1, 1.0)
will raise.NaN elements of Scipp variables are treated as equal.