Opened 11 years ago
Closed 11 years ago
#22524 closed New feature (wontfix)
New assertion assertQuerysetNotEqual
Reported by: | amatellanes | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.6 |
Severity: | Normal | Keywords: | test |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Add new reverse assertion of assertQuerysetEqual
.
Change History (4)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Personally, I don't care much for these type of negative assertions since there are an an infinite number of ways they can pass. Do you have a compelling use case in mind?
comment:3 by , 11 years ago
Sorry, I was not thinking about a particular use case. I think each assertion should have a symmetric one assertX
/ assertNotX
as most Python and Django assertions (i.e. assertTemplateUsed
/ assertTemplateNotUsed
).
comment:4 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Ok, well absent some argument for why adding this assertion will help make writing clearer tests, I don't think we should encourage writing tests this way. If someone wants to argue otherwise, please reopen.
I started a pull request for this ticket here: https://github.com/django/django/pull/2610