Commit 692526bf authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

test details

parent 7a87520a
Pipeline #16251 failed with stage
in 1 minute and 34 seconds
...@@ -12,13 +12,12 @@ class TestTalosWalkContact(unittest.TestCase): ...@@ -12,13 +12,12 @@ class TestTalosWalkContact(unittest.TestCase):
def test_talos_walk_contacts(self): def test_talos_walk_contacts(self):
with ServerManager('hpp-rbprm-server'): with ServerManager('hpp-rbprm-server'):
module_scenario = import_module(PATH + ".talos_flatGround") module_scenario = import_module(PATH + ".talos_flatGround")
if not hasattr(module_scenario, 'ContactGenerator'): self.assertTrue(hasattr(module_scenario, 'ContactGenerator'))
self.assertTrue(False)
ContactGenerator = getattr(module_scenario, 'ContactGenerator') ContactGenerator = getattr(module_scenario, 'ContactGenerator')
cg = ContactGenerator() cg = ContactGenerator()
cg.run() cg.run()
self.assertTrue(len(cg.configs) > 5) self.assertGreater(len(cg.configs), 5)
self.assertTrue(len(cg.configs) < 10) self.assertLess(len(cg.configs), 10)
self.assertEqual(cg.q_init, cg.configs[0]) self.assertEqual(cg.q_init, cg.configs[0])
self.assertEqual(cg.q_goal, cg.configs[-1]) self.assertEqual(cg.q_goal, cg.configs[-1])
......
...@@ -13,15 +13,14 @@ class TestTalosWalkPath(unittest.TestCase): ...@@ -13,15 +13,14 @@ class TestTalosWalkPath(unittest.TestCase):
def test_talos_walk_path(self): def test_talos_walk_path(self):
with ServerManager('hpp-rbprm-server'): with ServerManager('hpp-rbprm-server'):
module_scenario = import_module(PATH + ".talos_flatGround_path") module_scenario = import_module(PATH + ".talos_flatGround_path")
if not hasattr(module_scenario, 'PathPlanner'): self.assertTrue(hasattr(module_scenario, 'PathPlanner'))
self.assertTrue(False)
PathPlanner = getattr(module_scenario, 'PathPlanner') PathPlanner = getattr(module_scenario, 'PathPlanner')
planner = PathPlanner() planner = PathPlanner()
planner.run() planner.run()
ps = planner.ps ps = planner.ps
self.assertEqual(ps.numberPaths(), 1) self.assertEqual(ps.numberPaths(), 1)
self.assertTrue(ps.pathLength(0) > 6.) self.assertGreater(ps.pathLength(0), 6.)
self.assertTrue(ps.pathLength(0) < 7.) self.assertLess(ps.pathLength(0), 7.)
self.assertEqual(planner.q_init, ps.configAtParam(0, 0)) self.assertEqual(planner.q_init, ps.configAtParam(0, 0))
self.assertEqual(planner.q_goal, ps.configAtParam(0, ps.pathLength(0))) self.assertEqual(planner.q_goal, ps.configAtParam(0, ps.pathLength(0)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment