def test_deduce_levels_of_tasks_case3(self): tasks = extract_tasks_from_file_type_opt( r"tests/resources/tasks_opt_case3.txt") expected_outcome = { 0: ['1'], 1: ['2', '3', '4', '9'], 2: ['5', '7'], 3: ['6'], 4: ['8'] } outcome = deduce_levels_of_tasks(tasks) self.assertEqual(expected_outcome, outcome)
def test_deduce_levels_of_tasks_case5(self): tasks = extract_tasks_from_file_type_opt( r"tests/resources/tasks_opt_case5.txt") expected_outcome = {0: ['11', '12', '21', '22'], 1: ['13', '23']} outcome = deduce_levels_of_tasks(tasks) self.assertEqual(expected_outcome, outcome)