Exemplo n.º 1
0
 def test_iter_off1(self):
     """Simple test."""
     x = list(grouper([1, 2, 3, 4, 5, 6, 7], 2))
     assert x == [(1, 2), (3, 4), (5, 6), (7, None)]
Exemplo n.º 2
0
 def test_iter_off1_strfill(self):
     """Simple test."""
     x = list(grouper([1, 2, 3, 4, 5, 6, 7], 2, "x"))
     assert x == [(1, 2), (3, 4), (5, 6), (7, "x")]
Exemplo n.º 3
0
 def test_iter(self):
     """Simple test."""
     x = list(grouper([1, 2, 3, 4, 5, 6], 2))
     assert x == [(1, 2), (3, 4), (5, 6)]