def get_ordered_codes(exercise_numbers): """Returns with the ordered codes in the exercise_numbers.""" codes = [] for group in exercise_numbers: for item in group: try: i = int(item) codes.append(i) except ValueError: pass codes.sort() codes = integerlist.uniq(codes) return codes
def test_uniq_return_proper_values(self): for list_, _, result in self.known_values: self.assertEqual(integerlist.uniq(list_), result)