From 964ab66bc5da155f3d66064196cccdd773480720 Mon Sep 17 00:00:00 2001 From: stedif <stefano.difrischia@inaf.it> Date: Wed, 10 Aug 2022 17:50:40 +0200 Subject: [PATCH] L2SS-572: improve assert statements --- tangostationcontrol/tangostationcontrol/beam/delays.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/beam/delays.py b/tangostationcontrol/tangostationcontrol/beam/delays.py index 4cc835b1e..c080da244 100644 --- a/tangostationcontrol/tangostationcontrol/beam/delays.py +++ b/tangostationcontrol/tangostationcontrol/beam/delays.py @@ -15,7 +15,7 @@ class Delays: frame_location = measure.position("ITRF", *[f"{x}m" for x in itrf]) result = measure.do_frame(frame_location) - assert result == True + assert result == True , f"measure.do_frame failed for ITRF location {itrf}" self.reference_itrf = itrf self.measure = measure @@ -23,10 +23,11 @@ class Delays: def set_measure_time(self, utc_time: datetime.datetime): """ Configure the measure object for the specified time. """ - frame_time = self.measure.epoch("UTC", utc_time.isoformat(' ')) + utc_time_str = utc_time.isoformat(' ') + frame_time = self.measure.epoch("UTC", utc_time_str) result = self.measure.do_frame(frame_time) - assert result == True + assert result == True , f"measure.do_frame failed for UTC time {utc_time_str}" def get_direction_vector(self, pointing: numpy.ndarray) -> numpy.ndarray: """ Compute direction vector for a given pointing, relative to the measure. """ -- GitLab