Beispiel #1
0
 def test_consume_all(self):
     i = iter(range(100))
     consume(i)
     self.assertFalse(list(i))
Beispiel #2
0
 def test_consume_partial(self):
     i = iter(range(100))
     consume(i, n=50)
     self.assertListEqual(
         list(range(50, 100)),
         list(i))