I had written a similar utility function for testing and called it [assert_quantity](https://github.com/cdeil/gammapy/blob/fermi_psf/gammapy/utils/testing.py#L10) but with different semantics.

If you write it like that, then at least you have to describe in the docstring that you convert `desired` to `actual` and then e.g. `atol` applies to those numbers.

There's quite a bit of tests in Astropy already where asserts on quantities are split in two lines ... one testing values and the other testing units ... maybe `assert_quantity` makes sense in addition and you leave this one as is?