diff --git a/NaviGator/test/navigator_test/navigator_tests/mission_planner_test.py b/NaviGator/test/navigator_test/navigator_tests/mission_planner_test.py index ae7a23bb1..8775a8d6b 100644 --- a/NaviGator/test/navigator_test/navigator_tests/mission_planner_test.py +++ b/NaviGator/test/navigator_test/navigator_tests/mission_planner_test.py @@ -10,16 +10,32 @@ class MissionPlannerTest(TestUnit): + """ + Attributes: + nh (NodeHandle): it is an object that ensures the proper setup of processes + results (array): it is array that stores the status and name of the mission + count (int): increments for each process implemented + """ def __init__(self, nh): self.nh = nh self.results = [] self.count = 0 def mission_cb(self, mission): + """Updates the attributes pertaining to a mission + + Args: + mission (object): variables, like status, word, and name, are being extracted + """ status, word, name = mission.data.split() self.results.append((status, name)) def myassert(self, my_res): + """_summary_ + + Args: + my_res (_type_): _description_ + """ passed = True if len(my_res) != len(self.results): passed = False diff --git a/NaviGator/test/navigator_test/navigator_tests/odom_spoofer.py b/NaviGator/test/navigator_test/navigator_tests/odom_spoofer.py index 28a7fad9f..f58ff60ea 100644 --- a/NaviGator/test/navigator_test/navigator_tests/odom_spoofer.py +++ b/NaviGator/test/navigator_test/navigator_tests/odom_spoofer.py @@ -5,12 +5,21 @@ class MissionPlannerTest(TestUnit): + """ + Attributes: + nh (NodeHandle): it is an object that ensures the proper setup of processes + results (array): an unused variable that could store a list results for each process + count (int): a unused variable that could be utilized for incrementing + """ def __init__(self, nh: NodeHandle): self.nh = nh self.results = [] self.count = 0 def create_spoofs(self): + """ + A Spoof Generator is being created and the mission is being setup to start. + """ sg = SpoofGenerator() odom = Odometry() odom.pose.pose.position = Point(0, 0, 0) @@ -23,4 +32,7 @@ def create_spoofs(self): self.pub_base_mission1.start(self.nh) async def run_tests(self): + """ + Puts the object back to sleep after running each and every test case. + """ await self.nh.sleep(10000)