You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pants documentation on this is extremely lacking. I was searching around the codebase, and the coverage.py way of using # pragma: no cover no longer works since release 1.5.0dev0 (see #5363), having been explicitly readded in #4232. I could find no discussion on this, so I am assuming that this was an accident. Is that the case?
The text was updated successfully, but these errors were encountered:
On further investigation, the underlying issue appears to be that the exclude_list generated is not honored at all. The generated .coveragerc includes def __repr__ and raise NotImplementedError as exclude regexes, but these lines are still included in the report by pytest-cov.
chysi
changed the title
Coverage pragmas accidentally removed?
Python coverage cannot exclude lines
Sep 4, 2019
Hey @chysi, sorry no one replied to this. We agree that Coverage documentation was very lacking. The original implementation was also not great.
We ended up redesigning Pants' coverage implementation from the ground up as part of the upcoming Pants 2.0 release. Among several other changes, we no longer use a custom plugin, and allow you to set your own .coveragerc. See https://www.pantsbuild.org/v2.0/docs/python-test-goal#coverage.
We're hoping to release Pants 2.0 in the next few weeks. In the meantime, we'd be happy to help you get set up trying a dev release. We also have a Google group where we announce new releases. See https://www.pantsbuild.org/v2.0/docs/community for how to join our Slack and/or Google Group.
The pants documentation on this is extremely lacking. I was searching around the codebase, and the coverage.py way of using
# pragma: no cover
no longer works since release 1.5.0dev0 (see #5363), having been explicitly readded in #4232. I could find no discussion on this, so I am assuming that this was an accident. Is that the case?The text was updated successfully, but these errors were encountered: