Test aperture_photometry when error has units