django_coverage_plugin
django_coverage_plugin copied to clipboard
"Block library" templates have blank lines marked as missing
trafficstars
Some libraries use blocks from templates that have no {% extends %} tag. Normally a template like that would be fully rendered, so the blank lines between the blocks would be rendered. Since these templates are never rendered in full, those blank lines are never rendered. But coverage doesn't understand how these files are being used (as block libraries), so it marks the interstitial blank lines as missing.
Examples of libraries that do this: django-email-template, formulation and django-sniplates.
One possible solution is a magic marker for the first line of the template to indicate that blanks outside of blocks are NOQA ?