Coverage for src/pytest_vulture/__init__.py: 0.00%

1"""The vulture pytest plugin code source."""

2

3 __all__ = ["VultureError"]

4

5

6 class VultureError(Exception):

7 """Any pytest vulture exception."""

8

9 __message: str

10 _name = "vulture exception"

11

12 def __init__(self, message: str = "An error occurred") -> None:

13 super().__init__(self)

14 self.__message = message

15

16 @property

17 def message(self) -> str: # pragma: no cover

18 """Get the error message if it has one."""

19 return self.__message

20

21 def __str__(self) -> str: # pragma: no cover

22 return f"{self._name} : {self.message}"