def test_distinct2(self): linq = Linq([-1, 2, 1, 2, 3, -1, 2, 1]) assert_equal(linq.distinct(lambda x: x * x), Linq([-1, 2, 3]))
def test_distinct(self): linq = Linq([-1, 1, 1, 2, 3, -1, 2, 1]) assert_equal(linq.distinct(), Linq([-1, 1, 2, 3]))
def test_distinct2(self): linq = Linq([-1, 2, 1, 2, 3, -1, 2, 1]) assert_equal(linq.distinct(lambda x: x * x), Linq([-1, 2, 3]))
def test_distinct(self): linq = Linq([-1, 1, 1, 2, 3, -1, 2, 1]) assert_equal(linq.distinct(), Linq([-1, 1, 2, 3]))