Also, Pants 2.0 will create RAW coverage file (.co...
# general
d
Also, Pants 2.0 will create RAW coverage file (.coverage) in addition to xml and html?
h
d
Seems like we moved away from pytest --cov and in favor of coverage.py. Current way (pants 1.25) like test.pytest --test-pytest-coverage=auto still works with 2.0?
h
We redesigned coverage support in 1.30 and 2.0.
auto
never worked very well; it was confusing and the heuristic didn’t work with certain project layouts. The
coverage
field on
python_tests
target was tedious. Instead, Pants now much more closely aligns to how coverage would work if you didn’t use Pants. See https://www.pantsbuild.org/docs/how-to-upgrade-pants-2-0#coveragepy-support-was-redesigned-v1-engine-vs-v2-engine Regarding
pytest --cov
, that is only for us to generate the individual
.coverage
files for each distinct test you run. We then use
coverage.py
to merge it all into a single report (or single
.coverage
file)
d
Thanks for the detailed explanation. I like the coverage.py better. I am looking forward to upgrading to 2.0 👍
❤️ 1
h
You’re welcome! Please let us know how we can help with upgrading to 2.0. We’ve been putting a lot of polish into it and believe it’s a much better experience than what you’re getting with 1.25, including better concurrency, a more informative and less noisy UI, and dependency inference, where you can usually leave off the
dependencies
field of BUILD files because Pants will analyze your import statements The upgrade guide will hopefully help, and we’re also really happy to help with any challenges you run into or feedback you have.
Do you have any custom Pants plugins right now?
d
I am actually not sure. I focus on testing part. We are trying to use Coveralls. This is why I am excited that Pants 2.0 will create raw coverage file so it can be consumed by Coveralls.
💯 1
h
Got it. We use it for that same reason at my org Toolchain