[Django] #30105: Fix django test running ordering for partial unique constraint

3 views
Skip to first unread message

Django

unread,
Jan 15, 2019, 1:00:48 PM1/15/19
to django-...@googlegroups.com
#30105: Fix django test running ordering for partial unique constraint
------------------------------------------+------------------------
Reporter: Pavel Tyslacki | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
Bug com from #30062:

{{{
./tests/runtests.py migrations --parallel=1 --reverse --failfast
...
======================================================================
ERROR: test_create_model_with_partial_unique_constraint
(migrations.test_operations.OperationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/django/db/backends/utils.py", line 84, in
_execute
return self.cursor.execute(sql, params)
File "/home/tim/code/django/django/db/backends/sqlite3/base.py", line
376, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: index
test_constraint_pony_pink_for_weight_gt_5_uniq already exists

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/tim/code/django/tests/migrations/test_operations.py", line
527, in test_create_model_with_partial_unique_constraint
operation.database_forwards('test_crmo', editor, project_state,
new_state)
File "/home/tim/code/django/django/db/backends/sqlite3/schema.py", line
35, in __exit__
super().__exit__(exc_type, exc_value, traceback)
File "/home/tim/code/django/django/db/backends/base/schema.py", line
110, in __exit__
self.execute(sql)
File "/home/tim/code/django/django/db/backends/base/schema.py", line
137, in execute
cursor.execute(sql, params)
File "/home/tim/code/django/django/db/backends/utils.py", line 67, in
execute
return self._execute_with_wrappers(sql, params, many=False,
executor=self._execute)
File "/home/tim/code/django/django/db/backends/utils.py", line 76, in
_execute_with_wrappers
return executor(sql, params, many, context)
File "/home/tim/code/django/django/db/backends/utils.py", line 84, in
_execute
return self.cursor.execute(sql, params)
File "/home/tim/code/django/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/tim/code/django/django/db/backends/utils.py", line 84, in
_execute
return self.cursor.execute(sql, params)
File "/home/tim/code/django/django/db/backends/sqlite3/base.py", line
376, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: index
test_constraint_pony_pink_for_weight_gt_5_uniq already exists

}}}

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

Django

unread,
Jan 15, 2019, 1:07:50 PM1/15/19
to django-...@googlegroups.com
#30105: Fix django test running ordering for partial unique constraint
--------------------------------+------------------------------------------
Reporter: Pavel Tyslacki | Owner: Pavel Tyslacki
Type: Uncategorized | Status: assigned
Component: Uncategorized | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Pavel Tyslacki):

* owner: nobody => Pavel Tyslacki
* status: new => assigned


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

Django

unread,
Jan 15, 2019, 1:07:59 PM1/15/19
to django-...@googlegroups.com
#30105: Fix django test running ordering for partial unique constraint
--------------------------------+------------------------------------------
Reporter: Pavel Tyslacki | Owner: Pavel Tyslacki
Type: Uncategorized | Status: assigned
Component: Uncategorized | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Description changed by Pavel Tyslacki:

Old description:

New description:

Bug come from #30062:

}}}

--

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

Django

unread,
Jan 15, 2019, 4:45:30 PM1/15/19
to django-...@googlegroups.com
#30105: Fix django test running ordering for partial unique constraint
-------------------------------------+-------------------------------------

Reporter: Pavel Tyslacki | Owner: Pavel
| Tyslacki
Type: Bug | Status: closed
Component: Database layer | Version: 2.1
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted

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

* status: assigned => closed
* type: Uncategorized => Bug
* component: Uncategorized => Database layer (models, ORM)
* resolution: => fixed
* stage: Unreviewed => Accepted


Comment:

For future reference, a new ticket isn't really needed. We normally just
reference the recently fixed issue.

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

Reply all
Reply to author
Forward
0 new messages