Can <[email protected]> added the comment:
@sobolevn I was expecting the following test case to be covered.
self.assertRaises(self.failureException, self.assertCountEqual,
{'a': 1}, {'a': 2})
what I understand from the doc of the assertion is that elements have to be the
same without regard to order. The doc can be extended for dict.
In [10]: d = {"key": "value"}
In [11]: collections.Counter(list(d))
Out[11]: Counter({'key': 1})
In [12]: collections.Counter(d.items())
Out[12]: Counter({('key', 'value'): 1})
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46610>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com