Using --include
to also report on un-executed files or filter out files from --source
#1928
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
Using
--include
to also report on un-executed files. Here's a use case:foo.py:
test.py:
untested.py:
Running
coverage run test.py && coverage report
results in:Running
coverage run --source=. test.py && coverage report
results in:So far so good! ✅ We can force the untested files to be in the report as per the docs:
However, using
--include
to force specific filescoverage run --include="foo.py,untested.py" test.py && coverage report
still omits theuntested.py
file.Describe the solution you'd like
It'd be great if we can use
--include
to also get coverage reports on specific files.Describe alternatives you've considered
Perhaps we can use
--include
to filter out the files in--source
, as the current behavior currently ignores--include
:One workaround is to use
--omit
to exclude some files from--source
which can give you files for--include
. However, certain cases makes this hard (e.g. large code base being tested but you only want to--include
a couple of files).The text was updated successfully, but these errors were encountered: