diff --git a/PathPlanning/QuinticPolynomialsPlanner/quintic_polynomials_planner.py b/PathPlanning/QuinticPolynomialsPlanner/quintic_polynomials_planner.py index b0a42115..e2411d2b 100644 --- a/PathPlanning/QuinticPolynomialsPlanner/quintic_polynomials_planner.py +++ b/PathPlanning/QuinticPolynomialsPlanner/quintic_polynomials_planner.py @@ -145,7 +145,7 @@ def quinic_polynomials_planner(sx, sy, syaw, sv, sa, gx, gy, gyaw, gv, ga, max_a print("find path!!") break - if show_animation: + if show_animation: # pragma: no cover for i, _ in enumerate(rx): plt.cla() plt.grid(True) @@ -197,7 +197,7 @@ def main(): time, x, y, yaw, v, a, j = quinic_polynomials_planner( sx, sy, syaw, sv, sa, gx, gy, gyaw, gv, ga, max_accel, max_jerk, dt) - if show_animation: + if show_animation: # pragma: no cover plt.plot(x, y, "-r") plt.subplots() diff --git a/tests/test_a_star.py b/tests/test_a_star.py index d97715e3..1785393d 100644 --- a/tests/test_a_star.py +++ b/tests/test_a_star.py @@ -2,8 +2,6 @@ from unittest import TestCase from PathPlanning.AStar import a_star as m -print(__file__) - class Test(TestCase): diff --git a/tests/test_dubins_path_planning.py b/tests/test_dubins_path_planning.py index b83655b2..d2ddb8ca 100644 --- a/tests/test_dubins_path_planning.py +++ b/tests/test_dubins_path_planning.py @@ -22,3 +22,11 @@ class Test(TestCase): assert(abs(px[-1] - end_x) <= 0.1) assert(abs(py[-1] - end_y) <= 0.1) assert(abs(pyaw[-1] - end_yaw) <= 0.1) + + def test2(self): + dubins_path_planning.show_animation = False + dubins_path_planning.main() + + def test3(self): + dubins_path_planning.show_animation = False + dubins_path_planning.test()