That is better, but doesn't check for incorrectly repeated elements:
result = ["a", "b", "b"]
assert set(result) == {"a", "b"}
In fact that is the first main motivating failure case discussed in the readme. But actually that's simple enough to deal with too: from collections import Counter
assert Counter(result) = {"a": 1, "b": 1}
But would be trickier for mutable / unhashable types (not sure if "precisely" can deal with those).