Skip to content

Commit

Permalink
Add comments about why ensure_spice tests expect an exception to be r…
Browse files Browse the repository at this point in the history
…aised
  • Loading branch information
subagonsouth committed Aug 7, 2024
1 parent 78ae704 commit 8ff1136
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion imap_processing/tests/spice/test_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,18 @@ def test_ensure_spice_emus_mk_path(func, use_test_metakernel):
def test_ensure_spice_time_kernels():
"""Test functionality of ensure spice with timekernels set"""
wrapped = kernels.ensure_spice(spice.et2utc, time_kernels_only=True)
# TODO: Update/remove this test when a decision has been made about
# whether IMAP will use the time_kernels_only functionality and the
# ensure_spice decorator has been update.
with pytest.raises(NotImplementedError):
_ = wrapped(577365941.184, "ISOC", 3) == "2018-04-18T23:24:31.998"


def test_ensure_spice_key_error():
"""Test functionality of ensure spice with timekernels set"""
"""Test functionality of ensure spice when all branches fail"""
wrapped = kernels.ensure_spice(spice.et2utc)
# The ensure_spice decorator should raise a SpiceyError when all attempts to
# furnish a set of kernels with sufficient coverage for the spiceypy
# functions that it decorates.
with pytest.raises(SpiceyError):
_ = wrapped(577365941.184, "ISOC", 3) == "2018-04-18T23:24:31.998"

0 comments on commit 8ff1136

Please sign in to comment.