[issue36230] Please sort assertSetEqual's output

2019-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Jess, are you still working on this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36230] Please sort assertSetEqual's output

2019-03-08 Thread Jess
Jess added the comment: Good call on the repr(), hadn't noted the "3+4j" issue - __gt__ and __lt__ do work for compare there, but not sorted(). *shrug* Will make sure the solution takes that into account in some fashion. Bit slower as I expected as setting up the windows env has some bits

[issue36230] Please sort assertSetEqual's output

2019-03-08 Thread Windson Yang
Windson Yang added the comment: My point is careful about the non-sortable object. My mistake, this should be an enhancement, not a bug. -- versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue36230] Please sort assertSetEqual's output

2019-03-08 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: @rhettinger > It's possible to have non-sortable elements in the set, so you'll either need > to sort on the repr of the elements or have a fallback Yes, it is the repr that is used in the loop and that what's the sorting needs to be done against. @Windson Ya

[issue36230] Please sort assertSetEqual's output

2019-03-07 Thread Windson Yang
Change by Windson Yang : -- versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-

[issue36230] Please sort assertSetEqual's output

2019-03-07 Thread Windson Yang
Windson Yang added the comment: Just to be clear, as Raymond said, when we have two non-sortable objects (for instance, two instances which their class didn't implement the __lt__ and __gt__ methods), we should compare their repr() without sort() like now. -- nosy: +Windson Yang ___

[issue36230] Please sort assertSetEqual's output

2019-03-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I think it should require only a a sort It's possible to have non-sortable elements in the set, so you'll either need to sort on the repr of the elements or have a fallback: assertSetEqual({10, None, 'abc'}, {20, 3+4j, 10}) -- assignee: -

[issue36230] Please sort assertSetEqual's output

2019-03-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ezio.melotti, michael.foord, rbcollins ___ Python tracker ___ ___ Python-bugs-list ma

[issue36230] Please sort assertSetEqual's output

2019-03-07 Thread Jess
Jess added the comment: Wow! Thank you, very fast and the precise snippet of info I needed. Will try to send something off today. Very exciting. -- ___ Python tracker ___

[issue36230] Please sort assertSetEqual's output

2019-03-07 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Jess, I think this could be added. I think it should require only a a sort in https://github.com/python/cpython/blob/0f221d09cad46bee38d1b7a7822772df66c53028/Lib/unittest/case.py#L1127-L1138, to update the tests and add a blurb. You will need to get Python

[issue36230] Please sort assertSetEqual's output

2019-03-07 Thread Jess
New submission from Jess : Currently https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertSetEqual returns a random list, but I'd like to see it sorted for ease of reading which running tests. Should be small, but useful. Happy to make the edit myself, but have no clue h