How do I specify exclude_lines for PyCharm coverage? Follow
I am using Ubuntu 22.04, PyCharm 2022.2.4 and Python 3.11.0rc2.
I would like to automatically exclude coverage due to abstractmethods that are not executed.
I have heard that PyCharm uses coverage.py to display the coverage, so I have found the documentation for coverage.py (https://coverage.readthedocs.io/en/6.5.0/excluding.html#advanced- exclusion), I specified exclude_lines in .coveragerc and pyproject.toml.
When I invoked coverage.py from the console and checked the report and html, it was successfully excluded, but it does not seem to be applied to the display by PyCharm.
Is there a solution to this problem?
Please sign in to leave a comment.
Unfortunately, this is a known issue please vote for https://youtrack.jetbrains.com/issue/PY-20137/HTML-coverage-report-ignores-some-coverage-configuration-when-generated-from-PyCharm in order to increase its priority.