From 1c43001cf3ca0a54e302b0bd8f228aa92dba8776 Mon Sep 17 00:00:00 2001 From: Michael Foord Date: Fri, 5 Feb 2010 20:52:14 +0000 Subject: [PATCH] Closes issue 7030. --- Doc/library/unittest.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index b1899ce2356..d3b0767aae5 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