Beispiel #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))
Beispiel #2
0
 def test_all_false(self):
     assert not list_all(0 for _ in range(7))
Beispiel #3
0
 def test_all_true(self):
     assert list_all(range(1, 5))
Beispiel #4
0
 def test_full_iteration(self):
     seq = iter([1, 0, 3, 0, 5])
     assert not list_all(seq)
     assert_raises(StopIteration, seq.next)
Beispiel #5
0
 def test_all_false(self):
     assert not list_all(0 for _ in xrange(7))
Beispiel #6
0
 def test_all_true(self):
     assert list_all(range(1,5))