def testGenerator(self): self.assertEqual(navigation.first(lambda x: x, xrange(5)), 1)
def testMatch(self): self.assertEqual(navigation.first(lambda x: x, [False, True]), True)
def testFirstMatch(self): self.assertEqual(navigation.first(lambda x: x, [1, 2]), 1)
def testEmptyList(self): self.assertEqual(navigation.first(lambda x: x, []), None)
def testNoMatchInList(self): self.assertEqual(navigation.first(lambda x: x, [False]), None)
def testGenerator(self): self.assertEqual(navigation.first(lambda x: x, range(5)), 1)