Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6518f5e7
Commit
6518f5e7
authored
Dec 24, 2010
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix docs and comment for r87454.
parent
83961245
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
Doc/library/unittest.rst
Doc/library/unittest.rst
+1
-1
Lib/unittest/case.py
Lib/unittest/case.py
+1
-1
No files found.
Doc/library/unittest.rst
View file @
6518f5e7
...
...
@@ -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
...
...
Lib/unittest/case.py
View file @
6518f5e7
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment