Skip to content

Commit

Permalink
support github tests without DESI_SPECTRO_CALIB set
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Bailey authored and Stephen Bailey committed Aug 14, 2024
1 parent 47f597d commit 2ee5c1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion py/desispec/test/test_calibfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
from importlib import resources
import tempfile


from desispec.calibfinder import CalibFinder

_standard_calib_dirs = ('DESI_SPECTRO_CALIB' in os.environ) and ('DESI_SPECTRO_DARK' in os.environ)

class TestCalibFinder(unittest.TestCase):
"""Test desispec.calibfinder
"""
Expand Down Expand Up @@ -57,6 +58,7 @@ def test_init(self):
if cfinder.haskey("BIAS") :
print(cfinder.findfile("BIAS"))

@unittest.skipIf(not _standard_calib_dirs, "$DESI_SPECTRO_CALIB or $DESI_SPECTRO_DARK not set")
def test_missing_darks(self):
"""Missing dark files is only fatal if darks are requested
"""
Expand Down

0 comments on commit 2ee5c1a

Please sign in to comment.