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