def test_5(self): task_lst = [ (5, [4]), (4, [3]), (3, [2]), (2, [1]), (1, [0]), (0, []), ] sol = Solution(task_lst) actual = sol.get_tasks(start=4, end=2) print actual
def test_7(self): task_lst = [ (9, []), (8, []), (7, []), (6, [2]), (5, [7, 8]), (4, [9]), (3, [5]), (2, [5]), (1, [2, 3]), (0, [1, 4]), ] sol = Solution(task_lst) actual = sol.get_tasks(start=1, end=5) print actual
def test_8(self): task_lst = [ (9, [0]), (8, []), (7, []), (6, [2]), (5, [7, 8]), (4, [9]), (3, [5]), (2, [5]), (1, [2, 3]), (0, [1, 4]), ] sol = Solution(task_lst) # There is a cyclic, However, it does not affect 1 ->xx -> 5 actual = sol.get_tasks(start=1, end=5) print actual