def test_last2(self): linq = Linq([]) linq.last()
def test_last3(self): linq = Linq([11, 13, 15, 19]) assert_equal(linq.last(cond_f=lambda x: x % 3 == 2), 11) assert_equal(linq.last(cond_f=lambda x: x % 3 == 2), 11)
def test_last(self): linq = Linq([11, 13, 15, 19]) assert_equal(linq.last(), 19) assert_equal(linq.last(), 19)