mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-01-13 10:27:58 -05:00
update tests
This commit is contained in:
@@ -1,28 +1,27 @@
|
||||
import os
|
||||
import sys
|
||||
from unittest import TestCase
|
||||
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(__file__) + "/../")
|
||||
try:
|
||||
from PathPlanning.DynamicWindowApproach import dynamic_window_approach as m
|
||||
except:
|
||||
except ImportError:
|
||||
raise
|
||||
|
||||
print(__file__)
|
||||
|
||||
|
||||
class Test(TestCase):
|
||||
|
||||
def test1(self):
|
||||
class TestDynamicWindowApproach(TestCase):
|
||||
def test_main1(self):
|
||||
m.show_animation = False
|
||||
m.main(gx=1.0, gy=1.0)
|
||||
|
||||
def test2(self):
|
||||
def test_main2(self):
|
||||
m.show_animation = False
|
||||
m.main(gx=1.0, gy=1.0, robot_type=m.RobotType.rectangle)
|
||||
|
||||
|
||||
if __name__ == '__main__': # pragma: no cover
|
||||
test = Test()
|
||||
test.test1()
|
||||
test.test2()
|
||||
test = TestDynamicWindowApproach()
|
||||
test.test_main1()
|
||||
test.test_main2()
|
||||
|
||||
Reference in New Issue
Block a user