Is there any way to exclude private methods during testing coverage?
In my .coveragerc I tried:
[report]
exclude_lines =
__*
But it seems to exclude methods such as long_method_name
Is ther any way to do it without listing all methdos?
EDIT
I want methods such as __add__ which have simillar syntax to private to be included in the tests.
From the docs:
class MyObject(object):
def __init__(self):
blah1()
blah2()
def __repr__(self): # pragma: no cover
return "<MyObject>"
Excluding all private methods with one config option does not make sense IMO - it would lead to wrong assumptions if one looks on the coverage results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With