Skip to content

Commit

Permalink
remove an unused import and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich authored and bsipocz committed Nov 9, 2022
1 parent 7d79d27 commit 4a13dd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion astroquery/desi/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import astropy.coordinates as coord

from astropy import units as u
from astropy.units import Quantity
from astroquery.exceptions import NoResultsWarning
from astroquery.query import BaseQuery
from astroquery.utils import commons
Expand Down
8 changes: 4 additions & 4 deletions astroquery/desi/tests/test_desi.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'dummy_hdu_list_fits': 'hdu_list_images.fits'
}

coords = commons.ICRSCoord('11h04m27s +38d12m32s')
coords = coord.SkyCoord('11h04m27s +38d12m32s', frame='icrs')
radius = coord.Angle(0.5, unit='arcmin')
pixels = 60
data_release = 9
Expand Down Expand Up @@ -96,9 +96,9 @@ def compare_result_data(result, data):

def image_tester(images, filetype):
assert type(images) == list
data = fits.open(data_path(DATA_FILES[filetype]))
assert images[0][0].header == data[0].header
assert np.array_equal(images[0][0].data, data[0].data)
with fits.open(data_path(DATA_FILES[filetype])) as data:
assert images[0][0].header == data[0].header
assert np.array_equal(images[0][0].data, data[0].data)


def test_coords_query_region(patch_tap, coords=coords, radius=radius):
Expand Down

0 comments on commit 4a13dd6

Please sign in to comment.