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