[Django] #24423: Combine i18n template tag tests?

82 views
Skip to first unread message

Django

unread,
Feb 26, 2015, 8:03:01 PM2/26/15
to django-...@googlegroups.com
#24423: Combine i18n template tag tests?
--------------------------------------+--------------------
Reporter: prestontimmons | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Internationalization | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
I was working on #25372 and noticed there isn't an obvious place to add
extra tests. This is because the `i18n` tag tests are currently split
among `i18n` and `template_tests.syntax_tests.test_i18n`. I think these
tests should be combined in one place or the other.

I propose the following:

1) Move the tag-related tests from `i18n` into `template_tests`
2) Split `template_tests.syntax_tests.test_i18n` into separate files for
each tag (test_trans.py, test_blocktrans.py, etc.)

I think change 1 makes sense because `template_tests` is also where we
have tests for things like staticfiles, cache, etc. The timezone tags are
the only outlier here.

Change 2 is a pattern we adopted when converting the filter tests to unit
tests. I think it would be good for template tag tests to follow the same
pattern.

Does this seem like the right grouping?

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

Django

unread,
Feb 27, 2015, 2:16:01 PM2/27/15
to django-...@googlegroups.com
#24423: Combine i18n template tag tests?
--------------------------------------+------------------------------------

Reporter: prestontimmons | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


Comment:

Sounds good to me.

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

Django

unread,
Oct 7, 2016, 8:13:37 AM10/7/16
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
--------------------------------------+------------------------------------
Reporter: Preston Timmons | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: Internationalization | 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 Tim Graham):

* easy: 0 => 1


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

Django

unread,
Oct 9, 2016, 5:48:41 AM10/9/16
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Aleksandr
Type: | Sobolev
Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |

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 Aleksandr Sobolev):

* owner: nobody => Aleksandr Sobolev
* status: new => assigned


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

Django

unread,
Oct 9, 2016, 11:22:40 AM10/9/16
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Aleksandr
Type: | Sobolev
Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

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

* stage: Accepted => Ready for checkin


Comment:

Create pull request with three commits:
https://github.com/django/django/pull/7363

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

Django

unread,
Oct 9, 2016, 1:27:16 PM10/9/16
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Aleksandr
Type: | Sobolev
Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |
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 Tim Graham):

* has_patch: 0 => 1
* stage: Ready for checkin => Accepted


Comment:

Thanks for the patch. The correct
[https://docs.djangoproject.com/en/dev/internals/contributing/triaging-
tickets/ triage action] is to check "Has patch"' when adding a pull
request. "Ready for checkin" is set by the person who reviews the patch.

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

Django

unread,
Oct 9, 2016, 1:45:46 PM10/9/16
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Aleksandr
Type: | Sobolev
Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |
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 Aleksandr Sobolev):

Sorry, my fault. Next time I'll avoid such mistakes.

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

Django

unread,
Nov 11, 2016, 7:23:13 PM11/11/16
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Aleksandr
Type: | Sobolev
Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


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

Django

unread,
Dec 18, 2016, 12:58:03 AM12/18/16
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
--------------------------------------+------------------------------------
Reporter: Preston Timmons | Owner: (none)

Type: Cleanup/optimization | Status: new
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Aleksandr Sobolev):

* status: assigned => new
* owner: Aleksandr Sobolev => (none)


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

Django

unread,
Dec 21, 2016, 9:48:06 PM12/21/16
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Andy
Type: | Craze

Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Andy Craze):

* owner: (none) => Andy Craze


* status: new => assigned


Comment:

Added a PR with all the i18n template tags reorganized into
syntax_tests/i18n:
https://github.com/django/django/pull/7724

--
Ticket URL: <https://code.djangoproject.com/ticket/24423#comment:9>

Django

unread,
Dec 22, 2016, 8:10:57 PM12/22/16
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Andy
Type: | Craze
Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

Please uncheck "Patch needs improvement" on the ticket after updating the
PR for the comments.

--
Ticket URL: <https://code.djangoproject.com/ticket/24423#comment:10>

Django

unread,
Jan 1, 2017, 6:42:55 PM1/1/17
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Andy
Type: | Craze
Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |
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 Andy Craze):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/24423#comment:11>

Django

unread,
Jan 3, 2017, 5:50:04 PM1/3/17
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Andy
Type: | Craze
Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


Comment:

The patch looks good to me, but IIUC you need to squash it into a single
commit with a message following the correct commit message format.

--
Ticket URL: <https://code.djangoproject.com/ticket/24423#comment:12>

Django

unread,
Jan 4, 2017, 4:41:59 AM1/4/17
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Andy
Type: | Craze
Cleanup/optimization | Status: assigned
Component: | Version: master
Internationalization |
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 Martin):

* needs_better_patch: 1 => 0


* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/24423#comment:13>

Django

unread,
Jan 6, 2017, 10:33:28 AM1/6/17
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Andy
Type: | Craze
Cleanup/optimization | Status: closed
Component: | Version: master
Internationalization |
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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"97c1931c4f610e80053430d0297d51e1bed1e7ae" 97c1931c]:
{{{
#!CommitTicketReference repository=""
revision="97c1931c4f610e80053430d0297d51e1bed1e7ae"
Fixed #24423 -- Reorganized i18n tag tests.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24423#comment:14>

Django

unread,
Jun 14, 2017, 9:53:55 PM6/14/17
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Andy
Type: | Craze
Cleanup/optimization | Status: closed
Component: | Version: master
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"a6b5321ce997b899e540bb427cca98cb2b93a106" a6b5321]:
{{{
#!CommitTicketReference repository=""
revision="a6b5321ce997b899e540bb427cca98cb2b93a106"
Refs #24423 -- Readded inadvertently deleted i18n tests.

Mistake in 97c1931c4f610e80053430d0297d51e1bed1e7ae.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24423#comment:15>

Django

unread,
Jun 14, 2017, 10:12:20 PM6/14/17
to django-...@googlegroups.com
#24423: Combine i18n template tag tests
-------------------------------------+-------------------------------------
Reporter: Preston Timmons | Owner: Andy
Type: | Craze
Cleanup/optimization | Status: closed
Component: | Version: master
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"49de4f15413a4f281e835e383a7b1aa202a3dd7e" 49de4f15]:
{{{
#!CommitTicketReference repository=""
revision="49de4f15413a4f281e835e383a7b1aa202a3dd7e"
[1.11.x] Refs #24423 -- Readded inadvertently deleted i18n tests.

Mistake in 97c1931c4f610e80053430d0297d51e1bed1e7ae.

Backport of 357a6428980961b2c5311eb75d16229c7fc0d982 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24423#comment:16>

Reply all
Reply to author
Forward
0 new messages