assert_quantity_allclose#

gammapy.utils.testing.assert_quantity_allclose(actual, desired, rtol=1e-07, atol=None, **kwargs)[source]#

Assert all-close for astropy.units.Quantity objects.

Requires that unit is identical, not just that quantities are allclose taking different units into account.

We prefer this kind of assert for testing, since units should only change on purpose, so this tests more behaviour.