When computing the coverage of a project, I am getting cases where the placeholder body of a protocol method is considered as untested code. I would expect that the body of protocol methods would not be marked as untested.
Versions
python version 3.11
pytest version 7.3.0
pytest-cov version 4.0.0
Code
from typing import Protocol
class Example(Protocol):
def do_something() -> None:
...
In the above code, the line containing ... is marked as untested, despite the fact that it cannot, by definition, be tested because protocols cannot be implemented directly.
Summary
When computing the coverage of a project, I am getting cases where the placeholder body of a protocol method is considered as untested code. I would expect that the body of protocol methods would not be marked as untested.
Versions
python version 3.11 pytest version 7.3.0 pytest-cov version 4.0.0
Code
In the above code, the line containing
...
is marked as untested, despite the fact that it cannot, by definition, be tested because protocols cannot be implemented directly.