[Python-ideas] Thoughts about implementing object-compare in unittest package?

2020-07-25 Thread Henry Lin
Hey all, What are thoughts about implementing an object-compare function in the unittest package? (Compare two objects recursively, attribute by attribute.) This seems like a common use case in many testing scenarios, and there are many 3rd party solutions solving the same problem. (Maybe we can p

[Python-ideas] Re: Thoughts about implementing object-compare in unittest package?

2020-07-26 Thread Henry Lin
7;Aprano wrote: > On Sat, Jul 25, 2020 at 10:15:16PM -0500, Henry Lin wrote: > > Hey all, > > > > What are thoughts about implementing an object-compare function in the > > unittest package? (Compare two objects recursively, attribute by > > attribute.) > > W

[Python-ideas] Re: Thoughts about implementing object-compare in unittest package?

2020-07-26 Thread Henry Lin
g, we wouldn't have the ability to easily check. On Sun, Jul 26, 2020 at 4:13 PM Alex Hall wrote: > On Sun, Jul 26, 2020 at 11:01 PM Ethan Furman wrote: > >> On 7/26/20 10:31 AM, Henry Lin wrote: >> >> > You're right, declaring `__eq__` for the class we want to co

[Python-ideas] Re: Thoughts about implementing object-compare in unittest package?

2020-07-26 Thread Henry Lin
On Sun, Jul 26, 2020 at 8:29 PM Steven D'Aprano wrote: > On Sun, Jul 26, 2020 at 07:47:39PM +0200, Marco Sulla wrote: > > On Sun, 26 Jul 2020 at 19:33, Henry Lin wrote: > > > > > > > >- Any class implementing the `__eq__` operator is no longer hashable >

[Python-ideas] Re: Thoughts about implementing object-compare in unittest package?

2020-07-26 Thread Henry Lin
@Steven D'Aprano All good ideas ☺ I'm in agreement that we should be building solutions which are generalizable. Are there more concerns people would like to bring up when considering the problem of object equality? On Sun, Jul 26, 2020 at 9:25 PM Steven D'Aprano wrote: > On Sun, Jul 26, 2020