Пример #1
0
 def test_compare_coordinates_fail_4(self):
     lat1 = 52.0
     lng1 = 13.0
     lat2 = 42.0
     lng2 = 23.0
     tolerance = 100
     result = MatchBlock.compare_coordinates((lat1, lng1), (lat2, lng2),
                                             tolerance=tolerance)
     self.assertIs(result, False)
Пример #2
0
 def test_compare_coordinates_fail_1(self):
     lat1 = 41.49008
     lng1 = -71.312796
     lat2 = 41.499498
     lng2 = -81.695391
     tolerance = 100
     result = MatchBlock.compare_coordinates((lat1, lng1), (lat2, lng2),
                                             tolerance=tolerance)
     self.assertIs(result, False)
Пример #3
0
 def test_compare_coordinates_fail_2(self):
     lat1 = 52.520008
     lng1 = 13.404954
     lat2 = 42.520000
     lng2 = 23.400000
     tolerance = 600
     result = MatchBlock.compare_coordinates((lat1, lng1), (lat2, lng2),
                                             tolerance=tolerance)
     self.assertIs(result, False)
Пример #4
0
 def test_compare_coordinates_pass_2(self):
     lat1 = 52.520008
     lng1 = 13.404954
     lat2 = 53.551086
     lng2 = 9.993682
     tolerance = 200
     unit = 'mi'
     result = MatchBlock.compare_coordinates((lat1, lng1), (lat2, lng2),
                                             tolerance=tolerance,
                                             unit=unit)
     self.assertIs(result, True)