예제 #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)]
예제 #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")]
예제 #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)]