]> granicus.if.org Git - python/commitdiff
Fix docs and comment for r87454.
authorRaymond Hettinger <python@rcn.com>
Fri, 24 Dec 2010 00:52:54 +0000 (00:52 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 24 Dec 2010 00:52:54 +0000 (00:52 +0000)
Doc/library/unittest.rst
Lib/unittest/case.py

index 9c0f1a1d0d9feb0a78257f975b123ff11501eae9..9e309088b49df731ba6ea997ac72261d744cfb67 100644 (file)
@@ -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
index 68e53a5953e5b44353a59ef5a507eb101b1e9061..ad5fe6158968677fd5b707f807d2fef4f7c7ffdf 100644 (file)
@@ -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: