nedbat / django_coverage_plugin

A plugin for coverage.py to measure Django template execution
Apache License 2.0
196 stars 34 forks source link

Defaults for template_extensions override .coveragerc "omit" #79

Closed katylava closed 3 years ago

katylava commented 3 years ago

We have "*.txt" in our .coveragerc "omit" section, but .txt files are still being included in coverage reports. Started when the template_extensions configuration option was added. We aren't using that configuration option, so it looks like the default values for it ignore "omit" in .coveragerc. I'd expect custom values to override it, but not the defaults.

katylava commented 3 years ago

Or if that's supposed to be the new behavior then the docs should make it clear.

The Django template plugin uses some existing settings from your .coveragerc file. The source=, include=, and omit= options control what template files are included in the report.

nedbat commented 3 years ago

No, you are right, it should not be doing that. Is there any chance you could give me a repo to try it with?

katylava commented 3 years ago

The repo we are using it in is private but I can make a simple version sometime this week.

katylava commented 3 years ago

Oops, sorry. Looks like we are overriding our base .coveragerc in a few of our repos, and those do not have *.txt in the omit section. So I think everything is working correctly.