'Check physical units are changed appropriately'

@pytest.mark.parametrize(u'other', (u.mag, u.mag(), u.mag(u.Jy), u.mag(u.m), u.Unit((2 * u.mag)), u.MagUnit(u'', (2.0 * u.mag))))
def test_addition_subtraction(self, other):

    lu1 = u.mag(u.Jy)
    other_pu = getattr(other, u'physical_unit', u.dimensionless_unscaled)
    lu_sf = (lu1 + other)
    assert lu_sf.is_equivalent((lu1.physical_unit * other_pu))
    lu_sr = (other + lu1)
    assert lu_sr.is_equivalent((lu1.physical_unit * other_pu))
    lu_df = (lu1 - other)
    assert lu_df.is_equivalent((lu1.physical_unit / other_pu))
    lu_dr = (other - lu1)
    assert lu_dr.is_equivalent((other_pu / lu1.physical_unit))
