def test_all_trips_4(self): map = Map(1, 2, 3) map.append(1, 3, 10) map.append(3, 1, 1) accept_func = lambda step, distance: distance <= 12 trim_func = lambda step, distance: distance > 12 self.assertEqual(map.all_trips(1, 3, accept_func, trim_func), 1) accept_func = lambda step, distance: distance <= 21 trim_func = lambda step, distance: distance > 21 self.assertEqual(map.all_trips(1, 3, accept_func, trim_func), 2)
def test_all_trips_4(self): map = Map(1, 2, 3) map.append(1, 3, 10) map.append(3, 1, 1) accept_func = lambda step, distance: distance <= 12 trim_func = lambda step, distance: distance > 12 self.assertEqual(map.all_trips(1, 3, accept_func, trim_func), 1) accept_func = lambda step, distance: distance <= 21 trim_func = lambda step, distance: distance > 21 self.assertEqual(map.all_trips(1, 3, accept_func, trim_func), 2)
def test_all_trips_3(self): map = Map(1, 2, 3) map.append(1, 3, 1) map.append(3, 1, 1) accept_func = lambda step, distance: True trim_func = lambda step, distance: step > 5 self.assertEqual(map.all_trips(1, 3, accept_func, trim_func), 3)
def test_all_trips_3(self): map = Map(1, 2, 3) map.append(1, 3, 1) map.append(3, 1, 1) accept_func = lambda step, distance: True trim_func = lambda step, distance: step > 5 self.assertEqual(map.all_trips(1, 3, accept_func, trim_func), 3)
def test_all_trips_1(self): map = Map(1, 2, 3) map.append(1, 3, 100) accept_func = lambda step, distance: True trim_func = lambda step, distance: False self.assertEqual(map.all_trips(1, 3, accept_func, trim_func), 1)
def test_all_trips_1(self): map = Map(1, 2, 3) map.append(1, 3, 100) accept_func = lambda step, distance: True trim_func = lambda step, distance: False self.assertEqual(map.all_trips(1, 3, accept_func, trim_func), 1)