@@ -785,7 +785,7 @@ Test cases
785785 will be included in the error message. This method is used by default
786786 when comparing strings with :meth: `assertEqual `.
787787
788- If specified *msg * will be used as the error message on failure.
788+ If specified, *msg * will be used as the error message on failure.
789789
790790 .. versionadded :: 3.1
791791
@@ -806,7 +806,7 @@ Test cases
806806 Tests that *first * is or is not in *second * with an explanatory error
807807 message as appropriate.
808808
809- If specified *msg * will be used as the error message on failure.
809+ If specified, *msg * will be used as the error message on failure.
810810
811811 .. versionadded :: 3.1
812812
@@ -819,12 +819,31 @@ Test cases
819819
820820 Duplicate elements are ignored when comparing *actual * and *expected *.
821821 It is the equivalent of ``assertEqual(set(expected), set(actual)) ``
822- but it works with sequences of unhashable objects as well.
822+ but it works with sequences of unhashable objects as well. Because
823+ duplicates are ignored, this method has been deprecated in favour of
824+ :meth: `assertItemsEqual `.
823825
824- If specified *msg * will be used as the error message on failure.
826+ If specified, *msg * will be used as the error message on failure.
825827
826828 .. versionadded :: 3.1
827829
830+ .. deprecated :: 3.2
831+
832+ .. method :: assertItemsEqual(actual, expected, msg=None)
833+
834+ Test that sequence *expected * contains the same elements as *actual *,
835+ regardless of their order. When they don't, an error message listing the
836+ differences between the sequences will be generated.
837+
838+ Duplicate elements are *not * ignored when comparing *actual * and
839+ *expected *. It verifies if each element has the same count in both
840+ sequences. It is the equivalent of ``assertEqual(sorted(expected),
841+ sorted(actual)) `` but it works with sequences of unhashable objects as
842+ well.
843+
844+ If specified, *msg * will be used as the error message on failure.
845+
846+ .. versionadded :: 3.2
828847
829848 .. method :: assertSetEqual(set1, set2, msg=None)
830849
@@ -835,7 +854,7 @@ Test cases
835854 Fails if either of *set1 * or *set2 * does not have a :meth: `set.difference `
836855 method.
837856
838- If specified *msg * will be used as the error message on failure.
857+ If specified, *msg * will be used as the error message on failure.
839858
840859 .. versionadded :: 3.1
841860
@@ -847,7 +866,7 @@ Test cases
847866 method will be used by default to compare dictionaries in
848867 calls to :meth: `assertEqual `.
849868
850- If specified *msg * will be used as the error message on failure.
869+ If specified, *msg * will be used as the error message on failure.
851870
852871 .. versionadded :: 3.1
853872
@@ -858,7 +877,7 @@ Test cases
858877 superset of those in *expected *. If not, an error message listing
859878 the missing keys and mismatched values is generated.
860879
861- If specified *msg * will be used as the error message on failure.
880+ If specified, *msg * will be used as the error message on failure.
862881
863882 .. versionadded :: 3.1
864883
@@ -872,7 +891,7 @@ Test cases
872891 These methods are used by default when comparing lists or tuples with
873892 :meth: `assertEqual `.
874893
875- If specified *msg * will be used as the error message on failure.
894+ If specified, *msg * will be used as the error message on failure.
876895
877896 .. versionadded :: 3.1
878897
@@ -884,7 +903,7 @@ Test cases
884903 be raised. If the sequences are different an error message is
885904 constructed that shows the difference between the two.
886905
887- If specified *msg * will be used as the error message on failure.
906+ If specified, *msg * will be used as the error message on failure.
888907
889908 This method is used to implement :meth: `assertListEqual ` and
890909 :meth: `assertTupleEqual `.
@@ -1225,7 +1244,7 @@ Loading and running tests
12251244
12261245 :class: `TestLoader ` objects have the following methods:
12271246
1228-
1247+ a
12291248 .. method :: loadTestsFromTestCase(testCaseClass)
12301249
12311250 Return a suite of all tests cases contained in the :class: `TestCase `\ -derived
0 commit comments