|
1 | 1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst |
2 | 2 |
|
3 | | - |
4 | 3 | import numpy as np |
5 | 4 | import os |
6 | 5 | import pytest |
|
10 | 9 | from astropy.table import Table |
11 | 10 | from astropy.coordinates import SkyCoord |
12 | 11 | from astropy.io import fits |
13 | | -from astropy.tests.helper import catch_warnings |
14 | | -from astropy.utils.exceptions import AstropyDeprecationWarning |
15 | | - |
16 | 12 | import astropy.units as u |
17 | 13 |
|
18 | | -from ... import mast |
| 14 | +from astroquery.exceptions import NoResultsWarning |
| 15 | +from astroquery import mast |
| 16 | + |
19 | 17 |
|
20 | | -from ...exceptions import RemoteServiceError, NoResultsWarning |
| 18 | +OBSID = '1647157' |
21 | 19 |
|
22 | 20 |
|
23 | 21 | @pytest.mark.remote_data |
24 | 22 | class TestMast: |
25 | 23 |
|
26 | | - OBSID = '1647157' |
27 | | - |
28 | 24 | ############### |
29 | 25 | # utils tests # |
30 | 26 | ############### |
@@ -75,13 +71,6 @@ def test_mast_session_info(self): |
75 | 71 | assert sessionInfo['ezid'] == 'anonymous' |
76 | 72 | assert sessionInfo['token'] is None |
77 | 73 |
|
78 | | - def test_resolve_object(self): |
79 | | - m101_loc = mast.Mast.resolve_object("M101") |
80 | | - assert round(m101_loc.separation(SkyCoord("210.80227 54.34895", unit='deg')).value, 4) == 0 |
81 | | - |
82 | | - ticobj_loc = mast.Mast.resolve_object("TIC 141914082") |
83 | | - assert round(ticobj_loc.separation(SkyCoord("94.6175354 -72.04484622", unit='deg')).value, 4) == 0 |
84 | | - |
85 | 74 | ########################### |
86 | 75 | # ObservationsClass tests # |
87 | 76 | ########################### |
@@ -266,6 +255,8 @@ def test_observations_filter_products(self): |
266 | 255 | assert isinstance(result, Table) |
267 | 256 | assert len(result) == sum(products['productType'] == "SCIENCE") |
268 | 257 |
|
| 258 | + # test downloads 150+ files, 50MB+, TODO: revise OBSID to query only a few, small files for download |
| 259 | + @pytest.mark.skip("Tests should not download this much data. Skipping until revised.") |
269 | 260 | def test_observations_download_products(self, tmpdir): |
270 | 261 | test_obs_id = OBSID |
271 | 262 | result = mast.Observations.download_products(test_obs_id, |
|
0 commit comments