Terry J. Reedy added the comment:

Note: 2.7 doc says that this is renamed assertCountEqual in 3.x.  It was added 
in 2.7 and 3.2.  The 3.x doc is essentially the same, but with this instead: 
"Equivalent to: assertEqual(Counter(list(first)), Counter(list(second))) ...".

If the method misfunctions, then it should be fixed, not have the bug 
documented.  But you need to provide specific evidence and example.  The 
unittest in 3.x has this test with same number, different elements.
        self.assertRaises(self.failureException, self.assertCountEqual,
                          [1, 2] + [3] * 100, [1] * 100 + [2, 3])

I ran following test with same number, different items.
FAIL: test_Count (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "F:\Python\mypy\tem.py", line 4, in test_Count
    self.assertItemsEqual([1,2,3], [1,2,4])
AssertionError: Element counts were not equal:
First has 1, Second has 0:  3
First has 0, Second has 1:  4
 
This also fails in 3.5 with name change.

----------
components: +Library (Lib) -Documentation
nosy: +terry.reedy
stage:  -> test needed
type:  -> behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27060>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to