7
7
from urllib .parse import urlencode
8
8
9
9
import astropy .units as u
10
- from astropy .io .ascii import write as ap_write
11
- from astroquery .utils .commons import parse_coordinates
12
- from astropy .table import Table as AstroTable
13
- import numpy as np
14
10
import pkg_resources
15
11
import pytest
16
12
import requests
17
- try :
18
- pyvo_OK = True
19
- from pyvo .auth import authsession
20
- except ImportError :
21
- pyvo_OK = False
22
- pytest .skip ("Install pyvo for the nasa_exoplanet_archive module." , allow_module_level = True )
13
+
23
14
from astropy .coordinates import SkyCoord
24
- from astropy .tests .helper import assert_quantity_allclose
25
15
from astropy .utils .exceptions import AstropyDeprecationWarning
26
16
27
- from ...exceptions import InputWarning , InvalidQueryError , NoResultsWarning
17
+ from ...exceptions import NoResultsWarning
28
18
from ...utils .testing_tools import MockResponse
29
19
from ..core import NasaExoplanetArchive , conf , InvalidTableError
30
20
try :
@@ -194,7 +184,6 @@ def test_api_tables(patch_get, table, query):
194
184
# Mock tests on TAP service below
195
185
@patch ('astroquery.nasa_exoplanet_archive.core.get_access_url' ,
196
186
Mock (side_effect = lambda x : 'https://some.url' ))
197
- @pytest .mark .skipif (not pyvo_OK , reason = 'not pyvo_OK' )
198
187
def test_query_object ():
199
188
nasa_exoplanet_archive = NasaExoplanetArchive ()
200
189
@@ -217,7 +206,6 @@ def mock_run_query(object_name="K2-18 b", table="pscomppars", select="pl_name,di
217
206
218
207
@patch ('astroquery.nasa_exoplanet_archive.core.get_access_url' ,
219
208
Mock (side_effect = lambda x : 'https://some.url' ))
220
- @pytest .mark .skipif (not pyvo_OK , reason = 'not pyvo_OK' )
221
209
def test_query_region ():
222
210
nasa_exoplanet_archive = NasaExoplanetArchive ()
223
211
@@ -235,7 +223,6 @@ def mock_run_query(table="ps", select='pl_name,ra,dec', coordinates=SkyCoord(ra=
235
223
236
224
@patch ('astroquery.nasa_exoplanet_archive.core.get_access_url' ,
237
225
Mock (side_effect = lambda x : 'https://some.url' ))
238
- @pytest .mark .skipif (not pyvo_OK , reason = 'not pyvo_OK' )
239
226
def test_query_criteria ():
240
227
nasa_exoplanet_archive = NasaExoplanetArchive ()
241
228
@@ -255,7 +242,6 @@ def mock_run_query(table="ps", select='pl_name,discoverymethod,dec', where="disc
255
242
256
243
@patch ('astroquery.nasa_exoplanet_archive.core.get_access_url' ,
257
244
Mock (side_effect = lambda x : 'https://some.url' ))
258
- @pytest .mark .skipif (not pyvo_OK , reason = 'not pyvo_OK' )
259
245
def test_get_query_payload ():
260
246
nasa_exoplanet_archive = NasaExoplanetArchive ()
261
247
@@ -276,7 +262,6 @@ def mock_run_query(table="ps", get_query_payload=True, select="count(*)", where=
276
262
277
263
@patch ('astroquery.nasa_exoplanet_archive.core.get_access_url' ,
278
264
Mock (side_effect = lambda x : 'https://some.url' ))
279
- @pytest .mark .skipif (not pyvo_OK , reason = 'not pyvo_OK' )
280
265
def test_select ():
281
266
nasa_exoplanet_archive = NasaExoplanetArchive ()
282
267
@@ -295,7 +280,6 @@ def mock_run_query(table="ps", select=["hostname", "pl_name"], where="hostname='
295
280
296
281
@patch ('astroquery.nasa_exoplanet_archive.core.get_access_url' ,
297
282
Mock (side_effect = lambda x : 'https://some.url' ))
298
- @pytest .mark .skipif (not pyvo_OK , reason = 'not pyvo_OK' )
299
283
def test_get_tap_tables ():
300
284
nasa_exoplanet_archive = NasaExoplanetArchive ()
301
285
0 commit comments