django_coverage_plugin
django_coverage_plugin copied to clipboard
A plugin for coverage.py to measure Django template execution
I have Widget such as: ```python class PlanChoiceWidget(RadioSelect): option_template_name = "plans/plan_choice_widget.html" ``` and tests such as: ```python class PlanChoiceWidgetTests1(TestCase): def setUp(self): self.factory = RequestFactory() self.plan_pricing = baker.make( "PlanPricing", plan__name="Foo", price=Decimal("10.00"),...
Thanks for this plugin, which did almost exactly what we needed, apart from one issue, which this PR is an attempt to address. The issue we had was that our...
I have some templates that just contain and "extends" line that get marked as uncovered, although they clearly are. For example: templates/base.html 83% templates/games/base.html 0% templates/games/index.html 100% although the third...
## Summary If the Django template HTML file has CRLF line endings (`\r\n`) then, depending on line and file lengths, some random lines may be reported as 'missing' even though...
This fixed an issue I had in one of my files. I have no idea whether the TextNode was lacking a position because of a bug within Django or in...
Many of the issues that have been created are configuration and environment related, so they have been difficult to debug and identify. This PR exposes the 2 existing debugging flags...
I'm using a parent template (never used on its own but always extended from) with the following code snippet: ``` {% if page != "home" %} {% endif %} {%...
Hello, I'm trying to setup this plugin in a wagtail/django project (Django 4.0, wagtail 3.X). I have the package installed, set in the configuration for coverage and my django templates...
I have some custom template tags and filters. When I disable django_coverage_plugin or downgrade to version 1.3.1, all the code in the templatetags directory is marked as covered, as expected,...
Is it possible to exclude certain lines in templates? For example: ``` {% comment "foo" %} some commented out stuff {% endcomment %} ``` This will show up in the...