array_split.split_test.SplitTest.assertCountEqual¶
-
SplitTest.
assertCountEqual
(first, second, msg=None)¶ An unordered sequence comparison asserting that the same elements, regardless of order. If the same element occurs more than once, it verifies that the elements occur the same number of times.
- self.assertEqual(Counter(list(first)),
- Counter(list(second)))
- Example:
- [0, 1, 1] and [1, 0, 1] compare equal.
- [0, 0, 1] and [0, 1] compare unequal.