[Django] #22524: New assertion assertQuerysetNotEqual

10 views
Skip to first unread message

Django

unread,
Apr 26, 2014, 5:18:00 PM4/26/14
to django-...@googlegroups.com
#22524: New assertion assertQuerysetNotEqual
-----------------------------------+--------------------
Reporter: amatellanes | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: 1.6
Severity: Normal | Keywords: test
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------
Add new reverse assertion of `assertQuerysetEqual`.

--
Ticket URL: <https://code.djangoproject.com/ticket/22524>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 26, 2014, 5:24:36 PM4/26/14
to django-...@googlegroups.com
#22524: New assertion assertQuerysetNotEqual
-----------------------------------+--------------------------------------

Reporter: amatellanes | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: 1.6
Severity: Normal | Resolution:

Keywords: test | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by amatellanes):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/22524#comment:1>

Django

unread,
Apr 26, 2014, 6:43:32 PM4/26/14
to django-...@googlegroups.com
#22524: New assertion assertQuerysetNotEqual
-----------------------------------+--------------------------------------
Reporter: amatellanes | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: 1.6
Severity: Normal | Resolution:

Keywords: test | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------

Comment (by timo):

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?

--
Ticket URL: <https://code.djangoproject.com/ticket/22524#comment:2>

Django

unread,
Apr 27, 2014, 3:22:35 AM4/27/14
to django-...@googlegroups.com
#22524: New assertion assertQuerysetNotEqual
-----------------------------------+--------------------------------------
Reporter: amatellanes | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: 1.6
Severity: Normal | Resolution:

Keywords: test | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------

Comment (by amatellanes):

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`).

--
Ticket URL: <https://code.djangoproject.com/ticket/22524#comment:3>

Django

unread,
Apr 28, 2014, 10:20:46 AM4/28/14
to django-...@googlegroups.com
#22524: New assertion assertQuerysetNotEqual
-----------------------------------+--------------------------------------
Reporter: amatellanes | Owner: nobody
Type: New feature | Status: closed

Component: Testing framework | Version: 1.6
Severity: Normal | Resolution: wontfix

Keywords: test | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by timo):

* status: new => closed
* resolution: => wontfix


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/22524#comment:4>

Reply all
Reply to author
Forward
0 new messages