Commit 6518f5e7 authored by Raymond Hettinger's avatar Raymond Hettinger

Fix docs and comment for r87454.

parent 83961245
......@@ -1160,7 +1160,7 @@ Test cases
Duplicate elements are *not* ignored when comparing *actual* and
*expected*. It verifies if each element has the same count in both
sequences. Equivalent to:
``assertEqual(Counter(iter(actual)), Counter(iter(expected)))``
``assertEqual(Counter(list(actual)), Counter(list(expected)))``
but works with sequences of unhashable objects as well.
.. versionadded:: 3.2
......
......@@ -1021,7 +1021,7 @@ class TestCase(object):
actual = collections.Counter(actual_seq)
expected = collections.Counter(expected_seq)
except TypeError:
# Unsortable items (example: set(), complex(), ...)
# Handle case with unhashable elements
missing, unexpected = unorderable_list_difference(expected_seq, actual_seq)
else:
if actual == expected:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment