#28869: Django.test.tag Inconsistent Inheritance
-----------------------------------+--------------------------------------
Reporter: William Ayd | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.11
Severity: Normal | Resolution:
Keywords: testing, tag | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Comment (by Hrishikesh Barman):
Replying to [ticket:28869 William Ayd]:
> When subclassing test cases, decorated tags are inherited ONLY when the
subclass does not provide its own tag decorator. If the subclass provides
its own decorator(s) then the parent's tags are ignored.
> Will each only run one test a piece. I would expect that the former
would run both test cases, given all of the test cases in the attached
file are inherited from a class which is decorated with that tag.
I am a new contributor, I might be completely wrong but I think this is
how the `tag` decorator is supposed to work. When a parameter is
explitcitly passed into the tag decorator, the function should use that
tag and if the need is to specify another tag it should be done by
separating by commas.
{{{
@tag('slow', 'core')
def test_slow_but_core(self):
pass
}}}
docs: https://docs.djangoproject.com/en/1.11/topics/testing/tools
/#tagging-tests
If this is a confirmed bug, I'd like to work on it if you let me. :)
--
Ticket URL: <https://code.djangoproject.com/ticket/28869#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.21202dff197074f9c948874fe950a06c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.