#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
-----------------------------------+--------------------------------------
Description changed by Hrishikesh Barman:

Old description:

> 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.
>
> If you use the attached file, running:
>
> {{{
> python manage.py test
> }}}
>
> yields two test cases as expected. However, running
>
> {{{
> python manage.py test tag=foo-tests
> }}}
>
> OR
>
> {{{
> python manage.py test tag=baz-tests
> }}}
>
> 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.

New description:

 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.

 If you use the attached file, running:

 {{{
 python manage.py test
 }}}

 yields two test cases as expected. However, running

 {{{
 python manage.py test --tag=foo-tests
 }}}

 OR

 {{{
 python manage.py test --tag=baz-tests
 }}}

 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.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28869#comment:1>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.d3d9823781982939e0372005170d2990%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to