[TIP] [coverage] Why is --source=. not the default?

c.buhtz at posteo.jp c.buhtz at posteo.jp
Sat Jan 14 12:32:24 PST 2023


Hi,

at a beginner with using coverage I wondered a lot about the huge output 
and if I maybe misunderstood the intention of coverage. Because it also 
checks the coverage of 3rd-party external packages that don't belong to 
the project folder I'm currently in.
I sidenote on the docs tell me about "--source=.". Then the output looks 
nice and meaningful to me.

Why isn't that default behaviour of coverage?

Why would someone see the coverage of external packages?

IMHO the source folder is very easy to discover for coverage by itself 
with reading the pyproject.toml/setup.cfg or asking the package metadata 
itself.

Kind
Christian



More information about the testing-in-python mailing list