Opened 10 years ago

Closed 10 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 amatellanes, 10 years ago

I started a pull request for this ticket here: https://github.com/django/django/pull/2610

comment:2 by Tim Graham, 10 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 amatellanes, 10 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 Tim Graham, 10 years ago

Resolution: wontfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top