Skip to content

Commit

Permalink
hayabusa driver tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jrcain-usgs committed May 29, 2024
1 parent 1136e72 commit 5b6f569
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/pytests/test_hayabusa2_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import spiceypy as spice

import ale
from ale.drivers.hayabusa2_drivers import Hayabusa2ONCIsisLabelNaifSpiceDriver
from ale.formatters.formatter import to_isd

from conftest import get_image_kernels, convert_kernels, get_image_label, compare_dicts, get_isd
Expand All @@ -20,7 +21,6 @@ def test_kernels():
for kern in binary_kernels:
os.remove(kern)

@pytest.mark.xfail
@pytest.mark.parametrize("label_type", ['isis3'])
def test_hayabusa_load(test_kernels, label_type):
label_file = get_image_label('hyb2_onc_20151203_084458_w2f_l2a', label_type)
Expand All @@ -29,3 +29,18 @@ def test_hayabusa_load(test_kernels, label_type):
compare_dict = get_isd('hayabusa2')
print(json.dumps(isd_obj, indent=2))
assert compare_dicts(isd_obj, compare_dict) == []

class test_hayabusa(unittest.TestCase):

def setUp(self):
label = get_image_label("hyb2_onc_20151203_084458_w2f_l2a", "isis3")
self.driver = Hayabusa2ONCIsisLabelNaifSpiceDriver(label)

def test_instrument_id(self):
assert self.driver.instrument_id == 'HAYABUSA2_ONC-W2'

def test_sensor_model_version(self):
assert self.driver.sensor_model_version == 1

def test_spacecraft_name(self):
assert self.driver.spacecraft_name == 'HAYABUSA2'

0 comments on commit 5b6f569

Please sign in to comment.