Hi all! I’m noticing some weird behaviors between ...
# general
m
Hi all! I’m noticing some weird behaviors between Pants and coverage.py. Pants seem to ignore coverage.py’s setting for
include
and
omit
somewhat.
include
or
source
seem to do nothing as I see no report for modules that are not touched by tests;
omit
work by itself but gets ignored when you set
global_report = true
under pants.toml. Additionally, when you usually run
pants test ::
under a subdirectory, only relevant files/tests under that directory is tested/reported (only transiently dependent ones anyways); with
global_report = true
, all files in the entire repo are reported, ignoring
omit
and/or
source
include
. Are these known/expected behaviors? I am looking for a way to have coverage report the files that have no tests attached. I can achieve this with regular coverage via
--source=.
, but cannot achieve the same using pants. Would love if someone could point me in the right direction!
r
There is a bit of an issue with pants and coverage. I started working on it to fix it but didn't completely finish it. https://github.com/pantsbuild/pants/issues/18053