3

I'm trying to figure out how to edit the .coveragerc file so that docstrings aren't included in the percentage of code coverage. This is what I've tried:

[report]
exclude_lines =
    """

and I've also tried

[report]
exclude_lines =
    \"\"\"

but I still get shown near 100% code coverage for a script that is mainly made of docstrings.

1 Answer 1

3

Ah nevermind, my mistake, it turns out that they are already ignored. It's just that I was using the Pycharm editor, which highlights these docstring lines in green but they do not actually contribute to the percentage of code coverage

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.