Kaydet (Commit) 39baace6 authored tarafından jkleint's avatar jkleint Kaydeden (comit) Raymond Hettinger

Document that TestCase.assertCountEqual() can take iterables (GH-686)

üst b4c7f39b
...@@ -1244,9 +1244,8 @@ class TestCase(object): ...@@ -1244,9 +1244,8 @@ class TestCase(object):
def assertCountEqual(self, first, second, msg=None): def assertCountEqual(self, first, second, msg=None):
"""An unordered sequence comparison asserting that the same elements, """Asserts that two iterables have the same elements, the same number of
regardless of order. If the same element occurs more than once, times, without regard to order.
it verifies that the elements occur the same number of times.
self.assertEqual(Counter(list(first)), self.assertEqual(Counter(list(first)),
Counter(list(second))) Counter(list(second)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment