1 from nose.tools import eq_
2 from ..aggregate import aggregate
6 l = [0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14]
7 expected = [[0, 1, 2, 3, 4, 5], [10, 11, 12, 13, 14]]
10 for identifier, group in aggregate(l, lambda item: int(item / 10)):
11 result.append(list(group))