mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
Update breadth_first_search.py (#374)
This commit is contained in:
26
tests/test_breadth_first_search.py
Normal file
26
tests/test_breadth_first_search.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from unittest import TestCase
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
|
||||
"/../PathPlanning/BreadthFirstSearch/")
|
||||
|
||||
|
||||
try:
|
||||
import breadth_first_search as m
|
||||
except ImportError:
|
||||
raise
|
||||
|
||||
|
||||
print(__file__)
|
||||
|
||||
|
||||
class Test(TestCase):
|
||||
|
||||
def test1(self):
|
||||
m.show_animation = False
|
||||
m.main()
|
||||
|
||||
|
||||
if __name__ == '__main__': # pragma: no cover
|
||||
test = Test()
|
||||
test.test1()
|
||||
26
tests/test_depth_first_search.py
Normal file
26
tests/test_depth_first_search.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from unittest import TestCase
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
|
||||
"/../PathPlanning/DepthFirstSearch/")
|
||||
|
||||
|
||||
try:
|
||||
import depth_first_search as m
|
||||
except ImportError:
|
||||
raise
|
||||
|
||||
|
||||
print(__file__)
|
||||
|
||||
|
||||
class Test(TestCase):
|
||||
|
||||
def test1(self):
|
||||
m.show_animation = False
|
||||
m.main()
|
||||
|
||||
|
||||
if __name__ == '__main__': # pragma: no cover
|
||||
test = Test()
|
||||
test.test1()
|
||||
@@ -1,6 +1,15 @@
|
||||
from unittest import TestCase
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
|
||||
"/../PathPlanning/Dijkstra/")
|
||||
|
||||
|
||||
try:
|
||||
import dijkstra as m
|
||||
except ImportError:
|
||||
raise
|
||||
|
||||
from PathPlanning.Dijkstra import dijkstra as m
|
||||
|
||||
print(__file__)
|
||||
|
||||
@@ -10,3 +19,8 @@ class Test(TestCase):
|
||||
def test1(self):
|
||||
m.show_animation = False
|
||||
m.main()
|
||||
|
||||
|
||||
if __name__ == '__main__': # pragma: no cover
|
||||
test = Test()
|
||||
test.test1()
|
||||
|
||||
Reference in New Issue
Block a user