pytest-dev / pytest-cov

Coverage plugin for pytest.
MIT License
1.72k stars 211 forks source link

Automatically ignore lines that are just an ellipsis #555

Closed nickeldan closed 1 year ago

nickeldan commented 1 year ago

When creating a protocol, it is common practice to replace method thunk bodies with an ellipsis:

class Proto(typing.Protocol):
    def foo(self):
        ...

It seems as though a line containing nothing but ... should be automatically ignored when it comes to coverage.

RonnyPfannschmidt commented 1 year ago

That should be in coverage itself

nickeldan commented 1 year ago

That should be in coverage itself

Ah, good point.