summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Foord <fuzzyman@voidspace.org.uk>2010-02-05 20:52:14 (GMT)
committerMichael Foord <fuzzyman@voidspace.org.uk>2010-02-05 20:52:14 (GMT)
commit1c43001cf3ca0a54e302b0bd8f228aa92dba8776 (patch)
tree18a2fdd0fcf22a4ff3bf8676f5e5f6e37fcff5ef
parentb1e66ee6510b939ddf8e3f474eabc6284cc27e9d (diff)
downloadcpython-1c43001cf3ca0a54e302b0bd8f228aa92dba8776.zip
cpython-1c43001cf3ca0a54e302b0bd8f228aa92dba8776.tar.gz
cpython-1c43001cf3ca0a54e302b0bd8f228aa92dba8776.tar.bz2
Closes issue 7030.
-rw-r--r--Doc/library/unittest.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index b1899ce..d3b0767 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -806,12 +806,16 @@ Test cases
.. 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*,
regardless of their order. When they don't, an error message listing
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.
.. versionadded:: 2.7