Skip to content

Commit d8cd25b

Browse files
committed
update test code
1 parent aefa899 commit d8cd25b

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

PathPlanning/QuinticPolynomialsPlanner/quintic_polynomials_planner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def quinic_polynomials_planner(sx, sy, syaw, sv, sa, gx, gy, gyaw, gv, ga, max_a
145145
print("find path!!")
146146
break
147147

148-
if show_animation:
148+
if show_animation: # pragma: no cover
149149
for i, _ in enumerate(rx):
150150
plt.cla()
151151
plt.grid(True)
@@ -197,7 +197,7 @@ def main():
197197
time, x, y, yaw, v, a, j = quinic_polynomials_planner(
198198
sx, sy, syaw, sv, sa, gx, gy, gyaw, gv, ga, max_accel, max_jerk, dt)
199199

200-
if show_animation:
200+
if show_animation: # pragma: no cover
201201
plt.plot(x, y, "-r")
202202

203203
plt.subplots()

tests/test_a_star.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from PathPlanning.AStar import a_star as m
44

5-
print(__file__)
6-
75

86
class Test(TestCase):
97

tests/test_dubins_path_planning.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@ def test1(self):
2222
assert(abs(px[-1] - end_x) <= 0.1)
2323
assert(abs(py[-1] - end_y) <= 0.1)
2424
assert(abs(pyaw[-1] - end_yaw) <= 0.1)
25+
26+
def test2(self):
27+
dubins_path_planning.show_animation = False
28+
dubins_path_planning.main()
29+
30+
def test3(self):
31+
dubins_path_planning.show_animation = False
32+
dubins_path_planning.test()

0 commit comments

Comments
 (0)