[Python-ideas] Re: Allowing assertEqual etc to take multiple items

2020-05-28 Thread Steven D'Aprano
On Thu, May 28, 2020 at 11:40:52AM +0300, Serhiy Storchaka wrote: > Why do you think it will be faster? `a == b == c` is the same as `a == b > and b == c`, but a tiny bit slower. That surprises me. I thought that the big advantage of chained comparisons is that results are only evaluated once.

[Python-ideas] Re: Allowing assertEqual etc to take multiple items

2020-05-28 Thread Ram Rachum
On Thu, May 28, 2020 at 11:42 AM Serhiy Storchaka wrote: > 28.05.20 11:02, Ram Rachum пише: > > I recently submitted this PR > > , and > I > > had to use assertSequenceEqual twice, just because I wanted to compare 3 > > sequences

[Python-ideas] Re: Allowing assertEqual etc to take multiple items

2020-05-28 Thread Serhiy Storchaka
28.05.20 11:02, Ram Rachum пише: I recently submitted this PR , and I had to use assertSequenceEqual twice, just because I wanted to compare 3 sequences to each other rather than 2. You have wrote much more text in this message

[Python-ideas] Re: Allowing assertEqual etc to take multiple items

2020-05-28 Thread remi . lapeyre
Hi Ram, this is not possible without breaking a lot of code, assertSequenceEqual() already takes a third argument: Help on function assertSequenceEqual in module unittest.case: assertSequenceEqual(self, seq1, seq2, msg=None, seq_type=None) An equality assertion for ordered sequences (like