Python: How do I exclude docstrings in code coverage reporting?

Viewed 442

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 Answers
Related