diff --git a/sedkit/tests/test_modelgrid.py b/sedkit/tests/test_modelgrid.py index 2b88f17..22df51b 100644 --- a/sedkit/tests/test_modelgrid.py +++ b/sedkit/tests/test_modelgrid.py @@ -1,4 +1,5 @@ import unittest +import pytest import os import importlib_resources @@ -32,6 +33,7 @@ def setUp(self): self.bt = mg.BTSettl() + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_get_spectrum(self): """Test the get_spectrum method""" # On grid specific @@ -43,27 +45,32 @@ def test_get_spectrum(self): # Off grid spec = self.bt.get_spectrum(teff=3456, logg=5., alpha=0, meta=0) + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_resample_grid(self): """Test resample_grid method""" bt = self.bt new = bt.resample_grid(teff=[3500, 3600, 3700], logg=[5.], meta=[0], alpha=[0]) self.assertTrue(len(bt.index) > len(new.index)) + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_filter(self): """Test the filter metod works""" filt = self.bt.filter(teff=3500) self.assertEqual(len(filt), 1) + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_photometry(self): """Test the photometry method""" phot_mg = self.bt.photometry(['2MASS.J', '2MASS.H', '2MASS.Ks']) self.assertEqual(phot_mg.index.iloc[0]['spectrum'][0].size, 3) + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_plot(self): """Test that the plot method works""" plt = self.bt.plot(teff=3500, draw=False) self.assertEqual(str(type(plt)), "") + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_save(self): """Test the save method works""" self.bt.save('test.p') @@ -80,7 +87,7 @@ def test_load_model(): meta = mg.load_model(filepath) assert isinstance(meta, dict) - +@pytest.mark.skip(reason="BTSettl grid is not currently available") def test_load_ModelGrid(): """Test the load_ModelGrid function""" grid = mg.BTSettl() @@ -90,7 +97,7 @@ def test_load_ModelGrid(): assert isinstance(lmg, mg.ModelGrid) os.remove(test_p) - +@pytest.mark.skip(reason="BTSettl grid is not currently available") def test_BTSettl(): """Test the BTSettl grid""" grid = mg.BTSettl() diff --git a/sedkit/tests/test_sed.py b/sedkit/tests/test_sed.py index c08fdde..c1db273 100644 --- a/sedkit/tests/test_sed.py +++ b/sedkit/tests/test_sed.py @@ -1,4 +1,5 @@ import unittest +import pytest import copy import importlib_resources @@ -6,9 +7,9 @@ import astropy.units as q from astropy.coordinates import SkyCoord -from .. import sed -from .. import spectrum as sp -from .. import modelgrid as mg +from sedkit import sed +from sedkit import spectrum as sp +from sedkit import modelgrid as mg class TestSED(unittest.TestCase): @@ -169,12 +170,14 @@ def test_no_spectra(self): # Radius from spectral type s.results + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_compare_model(self): """Test for the compare_model method""" v = sed.VegaSED() bt = mg.BTSettl() v.compare_model(bt, teff=10000) + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_plot(self): """Test plotting method""" v = sed.VegaSED() @@ -241,6 +244,7 @@ def test_synthetic_photometry(self): self.assertTrue(len(v.synthetic_photometry) > 0) + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_fit_spectral_type(self): """Test that the SED can be fit by a spectral type atlas""" # Grab the SPL @@ -254,6 +258,7 @@ def test_fit_spectral_type(self): # Fit with SPL s.fit_spectral_type() + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_fit_modelgrid(self): """Test that the SED can be fit by a model grid""" # Grab BTSettl diff --git a/sedkit/tests/test_spectrum.py b/sedkit/tests/test_spectrum.py index 0e3f1d3..892f630 100644 --- a/sedkit/tests/test_spectrum.py +++ b/sedkit/tests/test_spectrum.py @@ -1,5 +1,6 @@ """A suite of tests for the spectrum.py module""" import unittest +import pytest import copy import importlib_resources @@ -71,6 +72,7 @@ def test_unit_conversion(self): self.assertEqual(s.spectrum[1].unit, fu) self.assertEqual(s.spectrum[2].unit, fu) + @pytest.mark.skip(reason="BTSettl grid is not currently available") def test_model_fit(self): """Test that a model grid can be fit""" # Empty fit results