Your regex was __*
, which matches one or more underscores, so it would exclude any line that had any underscores in it. This is not what you want.
This should work to exclude any function definition of a function that begins with double underscores:
[report]
exclude_lines =
def __
This seems like a bad idea to me. You need to know if these functions are properly tested. They are called from your public API: how can you claim your public API functions are fully tested if you are not measuring the coverage of the functions they call?
To exclude private methods, but not special methods, you can try a more elaborate regex:
[report]
exclude_lines =
def __[^(]*[^_][(]
but this is getting kind of crazy...