Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanmartim committed Jul 25, 2024
1 parent d833402 commit 33516f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import yaml
from lsst.ts.observatory.control.maintel.comcam import ComCam, ComCamUsages
from base_take_ptc_flats import BaseTakePTCFlats
from ..base_take_ptc_flats import BaseTakePTCFlats


class TakePTCFlatsComCam(BaseTakePTCFlats):
Expand Down
10 changes: 7 additions & 3 deletions tests/maintel/test_take_ptc_flats_comcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
import unittest.mock as mock

import pytest
from lsst.ts import salobj, externalscripts
from lsst.ts.externalscripts.take_ptc_flats_comcam import TakePTCFlatsComCam
from lsst.ts import salobj, externalscripts, standardscripts
from lsst.ts.externalscripts.maintel.take_ptc_flats_comcam import TakePTCFlatsComCam


class TestTakePTCFlatsComCam(
externalscripts.BaseScriptTestCase, unittest.IsolatedAsyncioTestCase
standardscripts.BaseScriptTestCase, unittest.IsolatedAsyncioTestCase
):
async def basic_make_script(self, index):
self.script = TakePTCFlatsComCam(index=index)
self.mock_camera()
self.mock_electrometer()

return (self.script,)

def mock_camera(self):
Expand All @@ -35,6 +36,7 @@ def mock_electrometer(self):

async def test_configure(self):
config = {
"filter": "r_03",
"flats_exp_times": [7.25, 7.25],
"electrometer_scan": {
"index": 1,
Expand All @@ -61,6 +63,7 @@ async def test_configure(self):

async def test_invalid_configuration(self):
bad_config = {
"filter": "r_03",
"flats_exp_times": [7.25, 7.25, 8.0],
"electrometer_scan": {
"index": 1,
Expand All @@ -76,6 +79,7 @@ async def test_invalid_configuration(self):

async def test_take_ptc_flats(self):
config = {
"filter": "r_03",
"flats_exp_times": [7.25, 7.25],
"electrometer_scan": {
"index": 1,
Expand Down

0 comments on commit 33516f6

Please sign in to comment.