def assertItemsEqual(self, xv, yv):
def _sortable_items(seq):<EOL><INDENT>for x in seq:<EOL><INDENT>if isinstance(x, dict):<EOL><INDENT>yield sorted(x.items())<EOL><DEDENT>elif isinstance(x, row_tuple.RowTuple):<EOL><INDENT>yield sorted(x.ordered_dict.items())<EOL><DEDENT>else:<EOL><INDENT>yield x<EOL><DEDENT><DEDENT><DEDENT>self.assertEqual(sorted(_sortable_items(xv)),<EOL>sorted(_sortable_items(yv)))<EOL>
Sorted comparison in a way that prevents Python 3 from bitching.