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