Hello Peter,
I've always felt the current behaviour of assertQuerysetEqual was weird and
always wondered why it was not implement the way you suggest.
I think you're approach is clever and I can't think of a way it would break
backward compatibility except if .values_list('charfield', flat=True
Seems reasonable to me. I would certainly read `assertQuerysetEqual(qs1,
qs2)` as checking they contain the same items.
On Tue, 4 Feb 2020 at 16:34, Peter Inglesby
wrote:
> Hi folks,
>
> I always find the behaviour of assertQuerysetEqual surprising,
> particularly when I pass it two querysets th
Hi folks,
I always find the behaviour of assertQuerysetEqual surprising, particularly
when I pass it two querysets that I expect to be the same, or when the
second argument is a list of model instances.
Under the covers, assertQuerysetEqual(xs, ys) is roughly equivalent to
assert [repr(x) for x i