@classmethod
def assert_equal(cls, old, new):
    """
        Equality test used in ASDF unit tests
        """
    from numpy.testing import assert_allclose
    from astropy.tests.helper import quantity_allclose
    assert quantity_allclose(old.flux, new.flux)
    assert quantity_allclose(old.spectral_axis, new.spectral_axis)
    if old.uncertainty is None:
        assert new.uncertainty is None
    else:
        assert old.uncertainty.uncertainty_type == new.uncertainty.uncertainty_type
        assert_allclose(old.uncertainty.array, new.uncertainty.array)
