[Python-checkins] r79132 - in python/trunk: Doc/library/unittest.rst Doc/whatsnew/2.7.rst Lib/test/test_cgi.py Lib/test/test_unittest.py Lib/unittest/case.py Lib/unittest/util.py

Nick Coghlan ncoghlan at gmail.com
Sun Mar 21 03:03:54 CET 2010


michael.foord wrote:
> +      Duplicate elements are *not* ignored when comparing *actual* and
> +      *expected*. It verifies if each element has the same count in both
> +      sequences. It is the equivalent of ``assertEqual(sorted(expected),
> +      sorted(actual))`` but it works with sequences of unhashable objects as
> +      well.

With the change in definition, you don't need the second half of that
last sentence anymore (with sorted() instead of set(), hashing doesn't
matter). Now, there may be a similar caveat that orderability doesn't
matter, but I didn't read the code closely enough to check.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-checkins mailing list