Skip to content

Commit

Permalink
Split the ComCam/LSSTCam image_taking_verification unit tests into tw…
Browse files Browse the repository at this point in the history
…o separate scripts.
  • Loading branch information
rbovill committed Dec 14, 2023
1 parent 8d0903f commit 2664f74
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
22 changes: 1 addition & 21 deletions tests/test_comcam_image_taking_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,7 @@ async def asyncSetUp(self) -> None:
# Start the controller and wait for it be ready.
await self.controller.start_task

async def test_comcam_image_taking_bts(self) -> None:
"""Execute the ComCamImageTaking integration test script,
which runs the ts_standardscripts/take_image_comcam.py script.
Use the configuration stored in the image_taking_configs.py module.
"""
# Instantiate the ComCamImageTaking integration tests.
script_class = ComCamImageTaking(test_env="bts")
# Get number of scripts
num_scripts = len(script_class.scripts)
print(
f"ComCam Image Taking verification. "
f"Running the {script_class.scripts[0][0]} script."
)
# 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])

async def test_comcam_image_taking_tts(self) -> None:
async def test_comcam_image_taking(self) -> None:
"""Execute the ComCamImageTaking integration test script,
which runs the ts_standardscripts/take_image_comcam.py script.
Use the configuration stored in the image_taking_configs.py module.
Expand Down
10 changes: 5 additions & 5 deletions tests/test_lsstcam_calibrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
from datetime import date

from lsst.ts import salobj
from lsst.ts.IntegrationTests import LSSTCamCalibrations, ScriptQueueController
from lsst.ts.IntegrationTests import LsstCamCalibrations, ScriptQueueController


class LSSTCamCalibrationsTestCase(unittest.IsolatedAsyncioTestCase):
class LsstCamCalibrationsTestCase(unittest.IsolatedAsyncioTestCase):
"""
Test the Make Latiss Configurations integration test scripts.
"""
Expand All @@ -44,14 +44,14 @@ async def asyncSetUp(self) -> None:
await self.controller.start_task

async def test_lsstcam_calibrations_flat(self) -> None:
"""Execute the LSSTCamCalibrations integration test script,
"""Execute the LsstCamCalibrations integration test script,
which runs the ts_standardscripts/maintel/make_lsstcam_calibratons.py
script.
Use the configuration stored in the image_taking_configs.py module.
"""
# Instantiate the LSSTCamCalibrations integration tests.
# Instantiate the LsstCamCalibrations integration tests.
calib_type = "flat"
script_class = LSSTCamCalibrations(calib_type=calib_type)
script_class = LsstCamCalibrations(calib_type=calib_type)
# Assert configurations were updated with current date.
self.assertEqual(
script_class.calib_configs["certify_calib_begin_date"],
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lsstcam_image_taking_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def test_lsstcam_image_taking(self) -> None:
which runs the ts_standardscripts/take_image_lsstcam.py script.
Use the configuration stored in the image_taking_configs.py module.
"""
# Instantiate the LSSTCamImageTaking integration tests.
# Instantiate the LsstCamImageTaking integration tests.
script_class = LsstCamImageTaking()
# Get number of scripts
num_scripts = len(script_class.scripts)
Expand Down

0 comments on commit 2664f74

Please sign in to comment.