From cd713843937710c34feb7e58df9ae241f6248283 Mon Sep 17 00:00:00 2001 From: rbovill Date: Thu, 14 Dec 2023 15:44:17 -0700 Subject: [PATCH] Split the ComCam/LSSTCam image_taking_verification unit tests into two separate scripts. --- .../test_comcam_image_taking_verification.py | 22 +------------------ tests/test_lsstcam_calibrations.py | 10 ++++----- .../test_lsstcam_image_taking_verification.py | 4 ++-- 3 files changed, 8 insertions(+), 28 deletions(-) diff --git a/tests/test_comcam_image_taking_verification.py b/tests/test_comcam_image_taking_verification.py index e2f5f9fe..94c54be8 100644 --- a/tests/test_comcam_image_taking_verification.py +++ b/tests/test_comcam_image_taking_verification.py @@ -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. diff --git a/tests/test_lsstcam_calibrations.py b/tests/test_lsstcam_calibrations.py index 82390495..aa4d4f51 100644 --- a/tests/test_lsstcam_calibrations.py +++ b/tests/test_lsstcam_calibrations.py @@ -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. """ @@ -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"], diff --git a/tests/test_lsstcam_image_taking_verification.py b/tests/test_lsstcam_image_taking_verification.py index 392397b3..8d71078f 100644 --- a/tests/test_lsstcam_image_taking_verification.py +++ b/tests/test_lsstcam_image_taking_verification.py @@ -47,8 +47,8 @@ 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. - script_class = LsstCamImageTaking() + # Instantiate the LsstCamImageTaking integration tests. + script_class = LsstCamImageTaking(test_env="bts") # Get number of scripts num_scripts = len(script_class.scripts) print(