Opened 10 years ago
Closed 10 years ago
#23567 closed Bug (fixed)
assertQuerysetEqual does not check for repeated items when used with ordered=False
Reported by: | Thomas C | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The current implementation falls back to set
equality when the ordered
argument is set to False
. This makes assertQuerysetEqual
unable to detect differences regarding the number of occurrences of each item.
The proposed PR uses Counter
instead of set
. This might break some tests as it is a more restrictive condition, but that might reveal potential bugs.
Change History (2)
comment:1 by , 10 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|---|
Version: | → master |
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Issue is valid and the provided patch LGTM so far, let's wait for the PR build to complete.