Exemple #1
0
 def testResultsTrue(self, value):
     """
     Test results when all are satisfactory.
     """
     self.assertEqual(
        list(takeuntil(lambda x: True, value)),
        value[:1]
     )
Exemple #2
0
 def testResultsFalse(self, value):
     """
     Test results when none are sastifactory.
     """
     self.assertEqual(
        list(takeuntil(lambda x: False, value)),
        value
     )