Esempio n. 1
0
 def test_count_4(self):
     self.assertEquals(15, IterTools.count(range(15)))
Esempio n. 2
0
 def test_count_3(self):
     self.assertEquals(1, IterTools.count(iter([1])))
Esempio n. 3
0
 def test_count_1(self):
     self.assertEquals(0, IterTools.count([]))
Esempio n. 4
0
 def test_count_2(self):
     self.assertEquals(1, IterTools.count([0]))
Esempio n. 5
0
 def has_errors(self):
     self.__logger.info("test of has error irregularities")
     self.__logger.info(list(self._irregularities))
     return IterTools.count(1 for (level, _message) in self._irregularities if level == logging.ERROR)