mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Closes issue 7030.
This commit is contained in:
parent
b1e66ee651
commit
1c43001cf3
1 changed files with 5 additions and 1 deletions
|
@ -806,12 +806,16 @@ Test cases
|
||||||
.. versionadded:: 2.7
|
.. versionadded:: 2.7
|
||||||
|
|
||||||
|
|
||||||
.. method:: assertSameElements(expected, actual, msg=None)
|
.. method:: assertSameElements(actual, expected, msg=None)
|
||||||
|
|
||||||
Test that sequence *expected* contains the same elements as *actual*,
|
Test that sequence *expected* contains the same elements as *actual*,
|
||||||
regardless of their order. When they don't, an error message listing
|
regardless of their order. When they don't, an error message listing
|
||||||
the differences between the sequences will be generated.
|
the differences between the sequences will be generated.
|
||||||
|
|
||||||
|
Duplicate elements are ignored when comparing *actual* and *expected*.
|
||||||
|
It is the equivalent of ``assertEqual(set(expected), set(actual))``
|
||||||
|
but it works with sequences of unhashable objects as well.
|
||||||
|
|
||||||
If specified *msg* will be used as the error message on failure.
|
If specified *msg* will be used as the error message on failure.
|
||||||
|
|
||||||
.. versionadded:: 2.7
|
.. versionadded:: 2.7
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue