This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cansarigol
Recipients cansarigol, eric.smith, sobolevn
Date 2022-02-02.14:23:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643811781.23.0.810673264539.issue46610@roundup.psfhosted.org>
In-reply-to
Content
@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})
History
Date User Action Args
2022-02-02 14:23:01cansarigolsetrecipients: + cansarigol, eric.smith, sobolevn
2022-02-02 14:23:01cansarigolsetmessageid: <1643811781.23.0.810673264539.issue46610@roundup.psfhosted.org>
2022-02-02 14:23:01cansarigollinkissue46610 messages
2022-02-02 14:23:01cansarigolcreate