[Django] #32168: Remove serial pk assumptions in aggregation_regress tests

27 views
Skip to first unread message

Django

unread,
Nov 3, 2020, 9:14:19 PM11/3/20
to django-...@googlegroups.com
#32168: Remove serial pk assumptions in aggregation_regress tests
------------------------------------------------+------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
[https://github.com/cockroachdb/django-cockroachdb CockroachDB] doesn't
use serial pks and some tests fail. Feel free to mention me on your pull
request if you cannot test your changes on CockroachDB.

{{{
======================================================================
FAIL: test_more_more (aggregation_regress.tests.AggregationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/tests/aggregation_regress/tests.py", line
702, in test_more_more
self.assertSequenceEqual(
AssertionError: Sequences differ: <QuerySet [{'pub': 604193433639452673,
'i[145 chars] 1}]> != [{'pub': 604193433675366401, 'id__count':[134
chars]: 1}]

First differing element 0:
{'pub': 604193433639452673, 'id__count': 2}
{'pub': 604193433675366401, 'id__count': 2}

- <QuerySet [{'pub': 604193433639452673, 'id__count': 2}, {'pub':
604193433646432257, 'id__count': 1}, {'pub': 604193433652854785,
'id__count': 2}, {'pub': 604193433659506689, 'id__count': 1}]>
+ [{'id__count': 2, 'pub': 604193433675366401},
+ {'id__count': 1, 'pub': 604193433690800129},
+ {'id__count': 2, 'pub': 604193433704824833},
+ {'id__count': 1, 'pub': 604193433718816769}]

======================================================================
FAIL: test_more_more_more (aggregation_regress.tests.AggregationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/tests/aggregation_regress/tests.py", line
880, in test_more_more_more
self.assertEqual(
AssertionError: Lists differ: [] != ['Apress', 'Sams']

Second list contains 2 additional elements.
First extra element 0:
'Apress'

- []
+ ['Apress', 'Sams']

======================================================================
FAIL: test_ticket_11293 (aggregation_regress.tests.AggregationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/tests/aggregation_regress/tests.py", line
1452, in test_ticket_11293
self.assertQuerysetEqual(
File "/home/tim/code/django/django/test/testcases.py", line 1053, in
assertQuerysetEqual
return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [604193433675366401, 604193433718816769,
604193433732775937, 604193433807945729] != [1, 4, 5, 6]

First differing element 0:
604193433675366401
1

- [604193433675366401, 604193433718816769, 604193433732775937,
604193433807945729]
+ [1, 4, 5, 6]
}}}

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

Django

unread,
Nov 4, 2020, 12:26:06 AM11/4/20
to django-...@googlegroups.com
#32168: Remove serial pk assumptions in aggregation_regress tests
--------------------------------------+------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

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

* stage: Unreviewed => Accepted


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

Django

unread,
Nov 4, 2020, 1:03:17 AM11/4/20
to django-...@googlegroups.com
#32168: Remove serial pk assumptions in aggregation_regress tests
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner:
Type: | christopherwang
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by christopherwang):

* owner: nobody => christopherwang
* status: new => assigned


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

Django

unread,
Nov 4, 2020, 2:03:13 AM11/4/20
to django-...@googlegroups.com
#32168: Remove serial pk assumptions in aggregation_regress tests
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner:
Type: | christopherwang
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

PR: https://github.com/django/django/pull/13639

@Tim Graham, should another patch be made for stable/3.1.x, or is this
mainly for future development on django-cockroachdb?

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

Django

unread,
Nov 4, 2020, 2:17:54 AM11/4/20
to django-...@googlegroups.com
#32168: Remove serial pk assumptions in aggregation_regress tests
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner:
Type: | christopherwang
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

Replying to [comment:3 christopherwang]:


> PR: https://github.com/django/django/pull/13639
>
> @Tim Graham, should another patch be made for stable/3.1.x, or is this
mainly for future development on django-cockroachdb?

Christopher, another patch is not necessary, also this doesn't qualify for
a backport.

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

Django

unread,
Nov 4, 2020, 2:29:07 AM11/4/20
to django-...@googlegroups.com
#32168: Remove serial pk assumptions in aggregation_regress tests
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner:
Type: | christopherwang
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by christopherwang):

Replying to [comment:4 Mariusz Felisiak]:


> Replying to [comment:3 christopherwang]:
> > PR: https://github.com/django/django/pull/13639
> >
> > @Tim Graham, should another patch be made for stable/3.1.x, or is this
mainly for future development on django-cockroachdb?
>
> Christopher, another patch is not necessary, also this doesn't qualify
for a backport.

Sounds good! Just wanted to make sure to follow through if more was
necessary.

--
Ticket URL: <https://code.djangoproject.com/ticket/32168#comment:5>

Django

unread,
Nov 4, 2020, 4:03:06 PM11/4/20
to django-...@googlegroups.com
#32168: Remove serial pk assumptions in aggregation_regress tests
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner:
Type: | christopherwang
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

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

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32168#comment:6>

Django

unread,
Nov 4, 2020, 4:54:27 PM11/4/20
to django-...@googlegroups.com
#32168: Remove serial pk assumptions in aggregation_regress tests
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner:
Type: | christopherwang
Cleanup/optimization | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"2f6312fcd13a6dd6b62393663b75b230f2e1bc96" 2f6312fc]:
{{{
#!CommitTicketReference repository=""
revision="2f6312fcd13a6dd6b62393663b75b230f2e1bc96"
Fixed #32168 -- Removed serial pk assumption in aggregation_regress tests.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32168#comment:8>

Django

unread,
Nov 4, 2020, 4:56:17 PM11/4/20
to django-...@googlegroups.com
#32168: Remove serial pk assumptions in aggregation_regress tests
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner:
Type: | christopherwang
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"77e93d3b207ec3ea00e75d54f2b65b2cde6dd0a8" 77e93d3]:
{{{
#!CommitTicketReference repository=""
revision="77e93d3b207ec3ea00e75d54f2b65b2cde6dd0a8"
Refs #32168 -- Fixed Publisher assertions in
AggregationTests.test_more_more.

Refer to Publisher objects instead of Books.

Test regression in 1bf25e9bc6df6c2ae4c0b10fb839e101471e8373.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32168#comment:7>

Reply all
Reply to author
Forward
0 new messages