def test_unique_not_hashable(): assert tuple(unique(([1], [1])))
def test_unique_dict(): assert tuple(unique(({1: 2}, {2: 3}), key=dicthash)) == ({1: 2}, {2: 3}) assert tuple(unique(({1: 2}, {1: 2}), key=dicthash)) == ({1: 2}, )
def test_unique(): assert tuple(unique((1, 2, 3))) == (1, 2, 3) assert tuple(unique((1, 2, 1, 3))) == (1, 2, 3)