path: more collision support

Made depthparams an iterable.
This commit is contained in:
sliptonic
2017-06-21 15:23:38 -05:00
committed by wmayer
parent 0326b5ba49
commit 8b804d71ae
7 changed files with 158 additions and 88 deletions

View File

@@ -41,7 +41,7 @@ class depthTestCases(unittest.TestCase):
expected =[8,6,4,2,1,0]
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths()
r = [i for i in d]
self.assertListEqual (r, expected)
def test10(self):
@@ -59,7 +59,7 @@ class depthTestCases(unittest.TestCase):
expected =[-2, -4, -6, -8, -10]
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths()
r = [i for i in d]
self.assertListEqual (r, expected)
def test20(self):
@@ -76,7 +76,7 @@ class depthTestCases(unittest.TestCase):
expected =[10]
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths()
r = [i for i in d]
self.assertListEqual (r, expected)
start_depth = 10
@@ -85,12 +85,9 @@ class depthTestCases(unittest.TestCase):
expected =[]
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths()
r = [i for i in d]
self.assertListEqual (r, expected)
def test30(self):
'''User Parameters passed in'''
clearance_height= 10
@@ -105,7 +102,7 @@ class depthTestCases(unittest.TestCase):
expected =[2, 4, 8, 10, 11, 12]
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths()
r = [i for i in d]
self.assertListEqual (r, expected)
def test40(self):
@@ -122,7 +119,7 @@ class depthTestCases(unittest.TestCase):
expected =[-2, -4, -6, -8, -9, -10]
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths()
r = [i for i in d]
self.assertListEqual (r, expected)
@@ -139,8 +136,8 @@ class depthTestCases(unittest.TestCase):
expected =[7.5, 5.0, 2.5, 0]
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths(equalstep=True)
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths, equalstep=True)
r = [i for i in d]
self.assertListEqual (r, expected)
@@ -157,8 +154,8 @@ class depthTestCases(unittest.TestCase):
expected =[7.0, 4.0, 1.0, 0]
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths(equalstep=True)
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths, equalstep=True)
r = [i for i in d]
self.assertListEqual (r, expected)
def test70(self):
@@ -175,9 +172,7 @@ class depthTestCases(unittest.TestCase):
expected =[1.0, 0]
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths(equalstep=True)
r = [i for i in d]
self.assertListEqual (r, expected)
d = PU.depth_params(clearance_height, rapid_safety_space, start_depth, step_down, z_finish_step, final_depth, user_depths)
r = d.get_depths()
self.assertListEqual (r, expected)