mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-01-13 02:57:58 -05:00
update test code
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -2,8 +2,6 @@ from unittest import TestCase
|
||||
|
||||
from PathPlanning.AStar import a_star as m
|
||||
|
||||
print(__file__)
|
||||
|
||||
|
||||
class Test(TestCase):
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user