As you can see in the picture below, coverage wants me to write a test case for the method inside the abc. But I dont know how to do it, I mean as far as I can see there is nothing to test.
Code:
from abc import ABC, abstractmethod
class BaseVPS(ABC):
@abstractmethod
def create_server(self):
...
Since testing something like an @abstractmethod is unnecessary, we can add this configuration file to the root of our project to add exclusions to the coverage.
pyproject.toml:
[tool.coverage.report]
exclude_also = [
"@(abc\\.)?abstractmethod",
]