Skip to content

Commit

Permalink
Disable tests of TNS query on GitHub Actions
Browse files Browse the repository at this point in the history
Until we set up a way to avoid "too many requests" errors during testing
  • Loading branch information
rhandberg committed Feb 8, 2022
1 parent 0fdd019 commit 09c34b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_tns.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
"""

import pytest
import os
import datetime
from astropy.coordinates import SkyCoord
from conftest import capture_cli
from flows import tns

#--------------------------------------------------------------------------------------------------
@pytest.mark.skipif(os.environ.get('CI') == 'true', reason="Disabled on GitHub Actions to avoid too many requests HTTP error")
def test_tns_search(SETUP_CONFIG):

coo_centre = SkyCoord(
Expand All @@ -28,6 +30,7 @@ def test_tns_search(SETUP_CONFIG):
assert res[0]['prefix'] == 'SN'

#--------------------------------------------------------------------------------------------------
@pytest.mark.skipif(os.environ.get('CI') == 'true', reason="Disabled on GitHub Actions to avoid too many requests HTTP error")
def test_tns_get_obj(SETUP_CONFIG):

res = tns.tns_get_obj('2019yvr')
Expand All @@ -37,6 +40,7 @@ def test_tns_get_obj(SETUP_CONFIG):
assert res['name_prefix'] == 'SN'

#--------------------------------------------------------------------------------------------------
@pytest.mark.skipif(os.environ.get('CI') == 'true', reason="Disabled on GitHub Actions to avoid too many requests HTTP error")
@pytest.mark.parametrize('date_begin,date_end', [
('2019-01-01', '2019-02-01'),
(datetime.date(2019, 1, 1), datetime.date(2019, 2, 1)),
Expand Down Expand Up @@ -69,6 +73,7 @@ def test_tns_getnames_wronginput(SETUP_CONFIG):
)

#--------------------------------------------------------------------------------------------------
@pytest.mark.skipif(os.environ.get('CI') == 'true', reason="Disabled on GitHub Actions to avoid too many requests HTTP error")
def test_run_querytns(SETUP_CONFIG):

# Run the command line interface:
Expand Down

0 comments on commit 09c34b0

Please sign in to comment.