示例#1
0
文件: test.py 项目: easyfox/LUCID
 def test_verticalCenteredLoops(self):
     for imgpath in self.verticalCenteredLoopsGrp:
         res = lucid.find_loop_byimg_testlauncher(imgpath)
         self.assertTrue(((res[2][0] == "Coord") or (res[2][0] == "ApproxCoord")))
         self.assertTrue(
             ((res[2][1] > ((res[0] // 2) - (res[0] // 8))) and (res[2][1] < (res[0] // 2) + (res[0] // 8)))
         )
示例#2
0
文件: test.py 项目: easyfox/LUCID
 def test_horizontalCenteredLoops(self):
     for imgpath in self.horizontalCenteredLoopsGrp:
         res = lucid.find_loop_byimg_testlauncher(imgpath)
         self.assertEqual(res[2][0], "Coord")
         self.assertTrue(
             ((res[2][2] > ((res[1] // 2) - (res[1] // 8))) and (res[2][2] < (res[1] // 2) + (res[1] // 8)))
         )
示例#3
0
文件: test.py 项目: easyfox/LUCID
 def test_horizontalUpLoops(self):
     for imgpath in self.horizontalUpLoopsGrp:
         res = lucid.find_loop_byimg_testlauncher(imgpath)
         self.assertTrue(((res[2][0] == "Coord") or (res[2][0] == "ApproxCoord")))
         self.assertTrue((res[2][2] < ((res[1] // 2) - (res[1] // 8))))
示例#4
0
文件: test.py 项目: easyfox/LUCID
 def test_robotArm(self):
     for imgpath in self.robotArmGrp:
         res = lucid.find_loop_byimg_testlauncher(imgpath)
         self.assertEqual(res[2][0], "ArmRobot")
         self.assertEqual(res[2][1], res[0])
示例#5
0
文件: test.py 项目: easyfox/LUCID
 def test_noLoops(self):
     for imgpath in self.noLoopsGrp:
         res = lucid.find_loop_byimg_testlauncher(imgpath)
         self.assertEqual(res[2], ("No loop detected", -1, -1))