Exemplo n.º 1
0
 def test_full_iteration(self):
     seq = iter([1, 0, 3, 0, 5])
     assert not list_all(seq)
     assert_raises(StopIteration, lambda: next(seq))
Exemplo n.º 2
0
 def test_all_false(self):
     assert not list_all(0 for _ in range(7))
Exemplo n.º 3
0
 def test_all_true(self):
     assert list_all(range(1, 5))
Exemplo n.º 4
0
 def test_full_iteration(self):
     seq = iter([1, 0, 3, 0, 5])
     assert not list_all(seq)
     assert_raises(StopIteration, seq.next)
Exemplo n.º 5
0
 def test_all_false(self):
     assert not list_all(0 for _ in xrange(7))
Exemplo n.º 6
0
 def test_all_true(self):
     assert list_all(range(1,5))