Skip to content

Commit

Permalink
mark the tests that download remote data
Browse files Browse the repository at this point in the history
  • Loading branch information
tepickering committed Apr 6, 2023
1 parent 403b594 commit 7b74827
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions specreduce/tests/test_extinction.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
)


@pytest.mark.remote_data
def test_supported_models():
"""
Test loading of supported models
Expand All @@ -22,6 +23,7 @@ def test_supported_models():
assert len(ext.transmission) > 0


@pytest.mark.remote_data
def test_custom_mag_model():
"""
Test creation of custom model from Quantity arrays
Expand All @@ -33,6 +35,7 @@ def test_custom_mag_model():
assert len(ext.transmission) > 0


@pytest.mark.remote_data
def test_custom_raw_mag_model():
"""
Test creation of custom model from Quantity arrays
Expand All @@ -44,6 +47,7 @@ def test_custom_raw_mag_model():
assert len(ext.transmission) > 0


@pytest.mark.remote_data
def test_custom_linear_model():
"""
Test creation of custom model from Quantity arrays
Expand All @@ -55,6 +59,7 @@ def test_custom_linear_model():
assert len(ext.transmission) > 0


@pytest.mark.remote_data
def test_missing_extinction_unit():
"""
Test creation of custom model from Quantity arrays
Expand All @@ -68,6 +73,7 @@ def test_missing_extinction_unit():
assert len(ext.transmission) > 0


@pytest.mark.remote_data
def test_transmission_model():
"""
Test creating of default atmospheric transmission model
Expand Down
4 changes: 4 additions & 0 deletions specreduce/tests/test_get_reference_file_path.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import pytest

from ..calibration_data import get_reference_file_path, get_pypeit_data_path


@pytest.mark.remote_data
def test_get_reference_file_path():
"""
Test to make sure a calibration reference file provided by specreduce_data can be accessed.
Expand All @@ -10,6 +13,7 @@ def test_get_reference_file_path():
assert p is not None


@pytest.mark.remote_data
def test_get_pypeit_data_path():
"""
Test to make sure pypeit reference data can be loaded
Expand Down
4 changes: 4 additions & 0 deletions specreduce/tests/test_linelists.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from ..calibration_data import load_pypeit_calibration_lines


@pytest.mark.remote_data
def test_pypeit_single():
"""
Test to load a single linelist from ``pypeit`` by passing a string.
Expand All @@ -21,6 +22,7 @@ def test_pypeit_single():
]


@pytest.mark.remote_data
def test_pypeit_list():
"""
Test to load and combine a set of linelists from ``pypeit`` by passing a list.
Expand All @@ -32,6 +34,7 @@ def test_pypeit_list():
assert "NeI" in line_tab['ion']


@pytest.mark.remote_data
def test_pypeit_empty():
"""
Test to make sure None is returned if an empty list is passed.
Expand All @@ -42,6 +45,7 @@ def test_pypeit_empty():
assert 'No calibration lines' in record[0].message.args[0]


@pytest.mark.remote_data
def test_pypeit_input_validation():
"""
Check that bad inputs for ``pypeit`` linelists raise the appropriate warnings and exceptions
Expand Down
4 changes: 4 additions & 0 deletions specreduce/tests/test_specphot_stds.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import pytest

from ..calibration_data import (
load_MAST_calspec,
load_onedstds
)


@pytest.mark.remote_data
def test_load_MAST():
sp = load_MAST_calspec("g191b2b_005.fits", show_progress=False)
assert sp is not None
assert len(sp.spectral_axis) > 0


@pytest.mark.remote_data
def test_load_onedstds():
sp = load_onedstds()
assert sp is not None
Expand Down
3 changes: 3 additions & 0 deletions specreduce/tests/test_synth_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ def test_make_2d_trace_image():
assert isinstance(ccdim, CCDData)


@pytest.mark.remote_data
@pytest.mark.filterwarnings("ignore:No observer defined on WCS")
def test_make_2d_arc_image_defaults():
ccdim = make_2d_arc_image()
assert isinstance(ccdim, CCDData)


@pytest.mark.remote_data
@pytest.mark.filterwarnings("ignore:No observer defined on WCS")
def test_make_2d_arc_pass_wcs():
nx = 3000
Expand Down Expand Up @@ -179,6 +181,7 @@ def test_make_2d_arc_pass_wcs():
)


@pytest.mark.remote_data
@pytest.mark.filterwarnings("ignore:No observer defined on WCS")
def test_make_2d_spec_image_defaults():
ccdim = make_2d_spec_image()
Expand Down

0 comments on commit 7b74827

Please sign in to comment.