test_set_reprs in test_pprint creates a complex arrangement of frozensets and tests the pretty-printed repr against a string hard-coded in the test. The hard-coded repr depends on the sort order of frozensets. However, "Since sets only define partial ordering (subset relationships), the output of the list.sort() method is undefined for lists of sets." (quoting http://docs.python.org/release/3.1/library/stdtypes.html#set-types-set-frozenset) In a nutshell, the test assumes frozenset({0}) will always sort before frozenset({1}), but: >>> frozenset({0}) < frozenset({1}) False >>> frozenset({1}) < frozenset({0}) False Consequently, this test is fragile. Small changes to Python's sort algorithm cause the test to fail when it should pass. I ran into this while playing with optimizations to the sort function, but I imagine other Python implementations will also run into trouble with this test.