diff --git a/osa/nightsummary/tests/test_source_coordinates.py b/osa/nightsummary/tests/test_source_coordinates.py index c8157bf7..97c7250e 100644 --- a/osa/nightsummary/tests/test_source_coordinates.py +++ b/osa/nightsummary/tests/test_source_coordinates.py @@ -1,3 +1,4 @@ +import numpy as np from astropy.coordinates import SkyCoord from astropy.table import Table @@ -23,7 +24,7 @@ def test_source_coordinates(run_catalog): # Check new coordinates crab_coords = SkyCoord.from_name('Crab') - assert table[table['source_name'] == 'Crab']['source_ra'] == crab_coords.ra.deg - assert table[table['source_name'] == 'Crab']['source_dec'] == crab_coords.dec.deg - assert table[table['source_name'] == 'MadeUpSource']['source_ra'] == 31.22 - assert table[table['source_name'] == 'MadeUpSource']['source_dec'] == 52.95 + assert np.isclose(table[table['source_name'] == 'Crab']['source_ra'], crab_coords.ra.deg) + assert np.isclose(table[table['source_name'] == 'Crab']['source_dec'], crab_coords.dec.deg) + assert np.isclose(table[table['source_name'] == 'MadeUpSource']['source_ra'], 31.22) + assert np.isclose(table[table['source_name'] == 'MadeUpSource']['source_dec'], 52.95)