Recently, when switching from Coveralls to Codecov coverage in my project dropped by a few percent. This seems to be due to partial hits, which are counted as hits in Coveralls but as misses in Codecov.
Here is a code example:
class Struct(object): # hit
def __init__(self, content=None): # hit
if content is not None: # partial hit
self.content = content # missed
s = Struct() # hit
As far I see, the if statement is fully evaluated by the interpreter. Why is it not counted as a hit, then?