Skip to content

Commit 4a13dd6

Browse files
keflavichbsipocz
authored andcommitted
remove an unused import and fix tests
1 parent 7d79d27 commit 4a13dd6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

astroquery/desi/core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import astropy.coordinates as coord
99

1010
from astropy import units as u
11-
from astropy.units import Quantity
1211
from astroquery.exceptions import NoResultsWarning
1312
from astroquery.query import BaseQuery
1413
from astroquery.utils import commons

astroquery/desi/tests/test_desi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
'dummy_hdu_list_fits': 'hdu_list_images.fits'
2121
}
2222

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

9797
def image_tester(images, filetype):
9898
assert type(images) == list
99-
data = fits.open(data_path(DATA_FILES[filetype]))
100-
assert images[0][0].header == data[0].header
101-
assert np.array_equal(images[0][0].data, data[0].data)
99+
with fits.open(data_path(DATA_FILES[filetype])) as data:
100+
assert images[0][0].header == data[0].header
101+
assert np.array_equal(images[0][0].data, data[0].data)
102102

103103

104104
def test_coords_query_region(patch_tap, coords=coords, radius=radius):

0 commit comments

Comments
 (0)