class TestRoute(unittest.TestCase): def setUp(self): a = Destination(52.2018585, 0.1149948, 'a') b = Destination(52.2018356, 0.1183616, 'b') c = Destination(52.2035764, 0.1236988, 'c') self.route = Route([a,b,c]) def test_edge_length(self): dist = self.route.edge_length(self.route.destinations[0], self.route.destinations[1]) self.assertEqual(round(dist,4), 0.2295) def test_length(self): distance = self.route.length() self.assertEqual(round(distance,4),0.6415)