[Django] #21636: distinct_on_fields tests require DatabaseFeature.ignores_nulls_in_unique_constraints

22 views
Skip to first unread message

Django

unread,
Dec 18, 2013, 11:25:46 AM12/18/13
to django-...@googlegroups.com
#21636: distinct_on_fields tests require
DatabaseFeature.ignores_nulls_in_unique_constraints
-----------------------------------+--------------------
Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 1 | UI/UX: 0
-----------------------------------+--------------------
{{{DistinctOnTests.setUp()}}} requires
'''DatabaseFeature.ignores_nulls_in_unique_constraints'''.

Django-mssql would skip all of theses tests due to
{{{can_distinct_on_fields = False}}}, but it throws a database exception
during setUp when it tries to insert multiple NULLs for the
'''greatest_fan''', nullable, unique field.

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

Django

unread,
Dec 18, 2013, 11:31:15 AM12/18/13
to django-...@googlegroups.com
#21636: distinct_on_fields tests require
DatabaseFeature.ignores_nulls_in_unique_constraints
-----------------------------------+--------------------------------------

Reporter: manfre | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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


Comment:

https://github.com/django/django/pull/2090

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

Django

unread,
Dec 18, 2013, 11:53:13 AM12/18/13
to django-...@googlegroups.com
#21636: distinct_on_fields tests require
DatabaseFeature.ignores_nulls_in_unique_constraints
-----------------------------------+--------------------------------------
Reporter: manfre | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: 1.6
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by manfre):

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


Comment:

PR was accidentally made against 1.6.x. This is likely a non-issue with
master because the '''can_distinct_on_fields''' check was bumped up to the
class, instead of on each of the tests. None of the known database
backends support '''can_distinct_on_fields''', but not
'''ignores_nulls_in_unique_constraints''' in such a way that causes an
error during setUp.

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

Reply all
Reply to author
Forward
0 new messages