def test_first2(self): linq = Linq([]) linq.first()
def test_first3(self): linq = Linq([11, 14, 15, 19]) assert_equal(linq.first(cond_f=lambda x: x % 2 == 0), 14) assert_equal(linq.first(cond_f=lambda x: x % 2 == 0), 14)
def test_first(self): linq = Linq([11, 13, 15, 19]) assert_equal(linq.first(), 11) assert_equal(linq.first(), 11)