File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 8
8
import astropy .coordinates as coord
9
9
10
10
from astropy import units as u
11
- from astropy .units import Quantity
12
11
from astroquery .exceptions import NoResultsWarning
13
12
from astroquery .query import BaseQuery
14
13
from astroquery .utils import commons
Original file line number Diff line number Diff line change 20
20
'dummy_hdu_list_fits' : 'hdu_list_images.fits'
21
21
}
22
22
23
- coords = commons . ICRSCoord ('11h04m27s +38d12m32s' )
23
+ coords = coord . SkyCoord ('11h04m27s +38d12m32s' , frame = 'icrs ' )
24
24
radius = coord .Angle (0.5 , unit = 'arcmin' )
25
25
pixels = 60
26
26
data_release = 9
@@ -96,9 +96,9 @@ def compare_result_data(result, data):
96
96
97
97
def image_tester (images , filetype ):
98
98
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 )
102
102
103
103
104
104
def test_coords_query_region (patch_tap , coords = coords , radius = radius ):
You can’t perform that action at this time.
0 commit comments