[Django] #35184: tests - use wildcards in labels

9 views
Skip to first unread message

Django

unread,
Feb 11, 2024, 10:32:16 PMFeb 11
to django-...@googlegroups.com
#35184: tests - use wildcards in labels
---------------------------------------------+------------------------
Reporter: אורי | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version:
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
I want to add wildcards to test labels. For example, if I have tests at
`speedy.core.accounts.tests.test_views`, and also
`speedy.net.accounts.tests.test_views` and
`speedy.match.accounts.tests.test_views`, I want to specify all of them
with a wildcard - something like `speedy.*.accounts.tests.test_views`. Or
even `*.test_views` which will include all the `test_views` files in my
project. And also `*.test_v*` which will be all the files that start with
`test_v`. This should be similar to wildcards in bash and in operating
systems. Is it possible to add such a feature?
--
Ticket URL: <https://code.djangoproject.com/ticket/35184>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 11, 2024, 11:10:49 PMFeb 11
to django-...@googlegroups.com
#35184: tests - use wildcards in labels
-----------------------------------+--------------------------------------
Reporter: אורי | Owner: nobody
Type: New feature | Status: closed
Component: Testing framework | Version:
Severity: Normal | Resolution: wontfix

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

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

Comment:

Hi,

Thanks for the suggestion though 2 things:
- feature requests must be submitted to the Django Forum first; and
- check out pytest (with pytest-django plugin) because it has the ability
to specify file paths & run specifc tests by keyword. Perhaps this suits
your needs?
--
Ticket URL: <https://code.djangoproject.com/ticket/35184#comment:1>

Django

unread,
Feb 12, 2024, 8:33:52 AMFeb 12
to django-...@googlegroups.com
#35184: tests - use wildcards in labels
-----------------------------------+--------------------------------------
Reporter: אורי | Owner: nobody
Type: New feature | Status: closed
Component: Testing framework | Version:
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Comment (by Baptiste Mispelon):

I'll also note that it's already possible to pass wildcards to the `-k`
option: https://docs.djangoproject.com/en/5.0/ref/django-admin/#cmdoption-
test-k (see also Python's official doc
https://docs.python.org/3/library/unittest.html#cmdoption-unittest-k)
--
Ticket URL: <https://code.djangoproject.com/ticket/35184#comment:2>

Django

unread,
Feb 12, 2024, 8:59:50 AMFeb 12
to django-...@googlegroups.com
#35184: tests - use wildcards in labels
-----------------------------------+--------------------------------------
Reporter: אורי | Owner: nobody
Type: New feature | Status: closed
Component: Testing framework | Version:
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Comment (by אורי):

Replying to [comment:2 Baptiste Mispelon]:


> I'll also note that it's already possible to pass wildcards to the `-k`
option: https://docs.djangoproject.com/en/5.0/ref/django-admin/#cmdoption-
test-k (see also Python's official doc
https://docs.python.org/3/library/unittest.html#cmdoption-unittest-k)

Thank you, I was not aware of the `-k` option!
--
Ticket URL: <https://code.djangoproject.com/ticket/35184#comment:3>

Reply all
Reply to author
Forward
0 new messages