coveragepy / coveragepy/django_coverage_plugin
Support template files that only included partials
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 202
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
I have a template file that includes a partial:
{% load i18n %}
{% partialdef some-partial %}
...
{% endpartialdef %}
And templates that include the partial as follows:
{% include "app/_partials.html#some-partial" %}
And I have tests that request URLs of views that use a template that include the partial. However, the reported coverage states lines 1-3 as missing:
project/templates/app_partials.html 6 3 0 0 50.00% 1-3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported Django template case with a file containing only a partial and a template that includes it. Trace how partial includes are handled during coverage collection, then add a regression test showing that the partial's executed lines are not reported as missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100