Skip to content

Commit

Permalink
Add missing import statement
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanmartim committed Nov 28, 2023
1 parent ad867ae commit f629709
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions tests/test_maintel_track_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from lsst.ts.idl.enums.MTPtg import WrapStrategy
from lsst.ts.observatory.control import RotType
from lsst.ts.standardscripts.maintel import TrackTarget
from lsst.ts.xml.enums.MTPtg import Planets

random.seed(47) # for set_random_lsst_dds_partition_prefix

Expand Down Expand Up @@ -150,9 +151,7 @@ async def test_configure_with_slew_planet(self):
self.script._mtcs.start_task = utils.make_done_future()

# Script can be configured with slew_planet
await self.configure_script(
slew_planet=dict(planet_name="PLUTO", rot_sky=0.0)
)
await self.configure_script(slew_planet=dict(planet_name="PLUTO"))

async def test_configure_with_ra_dec(self):
async with self.make_script():
Expand Down Expand Up @@ -230,6 +229,25 @@ async def test_run_slew_target_name(self):

self.assert_slew_target_name()

async def test_run_slew_planet(self):
async with self.make_script():
self.script._mtcs = unittest.mock.AsyncMock()
self.script._mtcs.start_task = utils.make_done_future()
self.script.tcs.slew_to_planet = unittest.mock.AsyncMock()
self.script.tcs.stop_tracking = unittest.mock.AsyncMock()

# Get planet name
planet_name = Planets["PLUTO"].name

# Check running with planet name
config = dict(slew_planet=dict(planet_name=planet_name))

await self.configure_script(**config)

await self.run_script()

self.assert_slew_planet(planet_name)

async def test_run_slew_azel(self):
async with self.make_script():
self.script._mtcs = unittest.mock.AsyncMock()
Expand Down

0 comments on commit f629709

Please sign in to comment.