def testCountIf(self): seq = (i for i in range(5)) c = func.count(seq, lambda x: x % 2 == 0) self.assertEqual(c, 3)
def testCount(self): seq = (i for i in range(5)) c = func.count(seq) self.assertEqual(c, 5)