django_coverage_plugin icon indicating copy to clipboard operation
django_coverage_plugin copied to clipboard

"Block library" templates have blank lines marked as missing

Open nedbat opened this issue 10 years ago • 1 comments
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.

nedbat avatar Jan 27 '15 01:01 nedbat

One possible solution is a magic marker for the first line of the template to indicate that blanks outside of blocks are NOQA ?

funkybob avatar Jan 27 '15 01:01 funkybob