Skip to content

Commit

Permalink
current changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PRANETALLU committed Nov 2, 2023
1 parent 8feb4ed commit bc1823e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions NaviGator/test/navigator_test/navigator_tests/odom_spoofer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

0 comments on commit bc1823e

Please sign in to comment.