My project has a structure like:
root/
.coveragerc
folder_a/
folder_b/
tests/
folder_a/
folder_b/
I would like to run coverage
against folder_a
and folder_b
. Is possible to run it in a single command? Something like pytest --cov=* tests/ --cov-report html
...
pytest --cov=folder_a --cov=folder_b
?--cov=folder_*
, then it depends on your shell whether it's expanded before passing the argument.--cov
itself doesn't expand globs. For example,--cov=folder_{a,b}
should work in bash, while--cov=folder_*
not.