Skip to content

Commit

Permalink
Updated the unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbovill committed Mar 25, 2024
1 parent 192a157 commit 1b59036
Showing 1 changed file with 58 additions and 2 deletions.
60 changes: 58 additions & 2 deletions tests/test_auxtel_night_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

from lsst.ts import salobj
from lsst.ts.IntegrationTests import (
AuxTelLatissAcquire,
AuxTelLatissAcquireTakeSequence,
AuxTelLatissTakeSequence,
AuxTelLatissWEPAlign,
AuxTelResetOffsets,
ScriptQueueController,
Expand Down Expand Up @@ -92,11 +94,15 @@ async def test_auxtel_latiss_wep_align(self) -> None:
# Assert scripts passed.
self.assertEqual(script_class.script_states, [8])

@parameterized.expand(["pointing", "verify", "nominal", "test"])
@parameterized.expand(
[
"pointing",
]
)
async def test_auxtel_latiss_acquire_and_take_sequence(self, sequence: str) -> None:
"""Execute the AuxTelLatissAcquireTakeSequence integration test script,
which runs the
ts_standardscripts/auxtel/auxtel_latiss_acquire_and_take_sequence.py
ts_externalscripts/auxtel/auxtel_latiss_acquire_and_take_sequence.py
script.
Use the configurations stored in the auxtel_night_operations_configs.py
module.
Expand All @@ -117,3 +123,53 @@ async def test_auxtel_latiss_acquire_and_take_sequence(self, sequence: str) -> N
self.assertEqual(len(self.controller.queue_list), num_scripts)
# Assert scripts passed.
self.assertEqual(script_class.script_states, [8])

@parameterized.expand(["verify", "nominal", "test"])
async def test_auxtel_latiss_acquire(self, sequence: str) -> None:
"""Execute the AuxTelLatissAcquire integration test scripts,
which runs the
ts_externalscripts/auxtel/auxtel_latiss_acquire.py script.
Use the configurations stored in the auxtel_night_operations_configs.py
module.
"""
# Instantiate the AuxTelLatissAcquire integration tests.
script_class = AuxTelLatissAcquire(sequence=sequence)
# Get number of scripts
num_scripts = len(script_class.scripts)
print(
f"AuxTel Latiss Acquire. "
f"Running the {script_class.scripts[0][0]} script, "
f"for the {script_class.sequence} sequence, "
f"\nwith configuration;\n{script_class.configs}"
)
# Execute the scripts.
await script_class.run()
# Assert script was added to ScriptQueue.
self.assertEqual(len(self.controller.queue_list), num_scripts)
# Assert scripts passed.
self.assertEqual(script_class.script_states, [8])

@parameterized.expand(["verify", "nominal", "test"])
async def test_auxtel_latiss_take_sequence(self, sequence: str) -> None:
"""Execute the AuxTelLatissTakeSequence integration test scripts,
which runs the
ts_externalscripts/auxtel/auxtel_latiss_acquire.py script.
Use the configurations stored in the auxtel_night_operations_configs.py
module.
"""
# Instantiate the AuxTelLatissTakeSequence integration tests.
script_class = AuxTelLatissTakeSequence(sequence=sequence)
# Get number of scripts
num_scripts = len(script_class.scripts)
print(
f"AuxTel Latiss Take Sequence. "
f"Running the {script_class.scripts[0][0]} script, "
f"for the {script_class.sequence} sequence, "
f"\nwith configuration;\n{script_class.configs}"
)
# Execute the scripts.
await script_class.run()
# Assert script was added to ScriptQueue.
self.assertEqual(len(self.controller.queue_list), num_scripts)
# Assert scripts passed.
self.assertEqual(script_class.script_states, [8])

0 comments on commit 1b59036

Please sign in to comment.