'An unordered sequence specific comparison.
Raises with an error message listing which elements of expected_seq
are missing from actual_seq and vice versa if any.'

def assertSameElements(self, expected_seq, actual_seq, msg=None):

    try:
        expected = set(expected_seq)
        actual = set(actual_seq)
        missing = list(expected.difference(actual))
        unexpected = list(actual.difference(expected))
        missing.sort()
        unexpected.sort()
    except TypeError:
        expected = list(expected_seq)
        actual = list(actual_seq)
        expected.sort()
        actual.sort()
        (missing, unexpected) = _SortedListDifference(expected, actual)
    errors = []
    if missing:
        errors.append(('Expected,    but    missing:\n                %r' % missing))
    if unexpected:
        errors.append(('Unexpected,    but    present:\n                %r' % unexpected))
    if errors:
        standardMsg = '\n'.join(errors)
        self.fail(self._formatMessage(msg, standardMsg))
