[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Concur with Eric and Raymond. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: I agree with Eric that this should not be changed. It is working as documented and intended. In its original incarenation, assertCountEqual was documented as being equivalent to ``assertEqual(sorted(expected), sorted(actual))``. Either way, the goal

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Can
Can 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

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: The PR changes the meaning of assertCountEqual. https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertCountEqual says: Equivalent to: assertEqual(Counter(list(first)), Counter(list(second))) ... At the very least, the documentation would

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Can
Change by Can : -- keywords: +patch pull_requests: +29261 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31077 ___ Python tracker ___

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Nikita Sobolev
Change by Nikita Sobolev : -- components: +Library (Lib) versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker ___ ___

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Nikita Sobolev
New submission from Nikita Sobolev : @cansarigol, can you please specify what do you expect and how it works? -- nosy: +sobolevn ___ Python tracker ___

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Can
Change by Can : -- nosy: cansarigol priority: normal severity: normal status: open title: assertCountEqual doesn't work as expected for dictionary elements type: behavior ___ Python tracker