Added support for namespace packages
This pr adds support for including namespace packages the coverage report.
Fixes https://github.com/nedbat/coveragepy/issues/1383
Thanks. I would rather have a config file setting for this, and not add a command line switch if that's OK with you.
include_namespace_packages is a good name?
Hello @nedbat, do you know if it's possible to merge this PR ? I dont use __init__ files in my project so I need this PR if I want full coverage.
Hello @nedbat, do you know if it's possible to merge this PR ? I dont use
__init__files in my project so I need this PR if I want full coverage.
Just to be clear: this setting will only help find completely unexecuted files. Are you in that situation where you have files that aren't executed, but are not being found with the source= setting?
I think this seems like a reasonable change, but you mentioned "full coverage" which isn't how I would have described it.
Thank you for your quick answer.
Just to be clear: this setting will only help find completely unexecuted files. Are you in that situation where you have files that aren't executed, but are not being found with the source= setting?
Yes actually in my project where I use pytest-cov (https://github.com/bersiroth/highway-code-test/pull/8) I have a coverage at 100% but it's 100% of executed files, in my case I have lot of files where I didn't make test yet.
I think this seems like a reasonable change, but you mentioned "full coverage" which isn't how I would have described it.
I think "full discover" it's better description. What I wanted to say it's if I configure source with src folder I would like to know coverage of all files in this repository not only executed files.
If this PR still miss somthing, I'm open to handle it
Thanks!
Some docs, attribution, and style clean-up finished this in commit 709c7443.
@nedbat happy to see this merged!
This is now released as part of coverage 7.0.0b1.