I bet this breaks tests in Python 2.x :) Unfortunately set repr is different in 2.x and 3.x, and NLTK test runner doesn't fix that. It seems that comparing two sets is the sanest way to deal with this issue.