Skip to content

Commit 4bbcd45

Browse files
committed
Cleaning up test file, move global variable, remove duplicated test and unused imports
1 parent 96613d1 commit 4bbcd45

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

astroquery/mast/tests/test_mast_remote.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

3-
43
import numpy as np
54
import os
65
import pytest
@@ -10,21 +9,18 @@
109
from astropy.table import Table
1110
from astropy.coordinates import SkyCoord
1211
from astropy.io import fits
13-
from astropy.tests.helper import catch_warnings
14-
from astropy.utils.exceptions import AstropyDeprecationWarning
15-
1612
import astropy.units as u
1713

18-
from ... import mast
14+
from astroquery.exceptions import NoResultsWarning
15+
from astroquery import mast
16+
1917

20-
from ...exceptions import RemoteServiceError, NoResultsWarning
18+
OBSID = '1647157'
2119

2220

2321
@pytest.mark.remote_data
2422
class TestMast:
2523

26-
OBSID = '1647157'
27-
2824
###############
2925
# utils tests #
3026
###############
@@ -75,13 +71,6 @@ def test_mast_session_info(self):
7571
assert sessionInfo['ezid'] == 'anonymous'
7672
assert sessionInfo['token'] is None
7773

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-
8574
###########################
8675
# ObservationsClass tests #
8776
###########################
@@ -266,6 +255,8 @@ def test_observations_filter_products(self):
266255
assert isinstance(result, Table)
267256
assert len(result) == sum(products['productType'] == "SCIENCE")
268257

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.")
269260
def test_observations_download_products(self, tmpdir):
270261
test_obs_id = OBSID
271262
result = mast.Observations.download_products(test_obs_id,

0 commit comments

Comments
 (0)