Skip to content

Plugin Exceptions

BaseQasePluginException

Bases: Exception

Represent BaseQasePlugin exception.

Source code in pytest_qaseio/plugin_exceptions.py
1
2
3
4
5
6
7
8
9
class BaseQasePluginException(Exception):  # noqa: N818
    """Represent BaseQasePlugin exception."""

    message: str = ""

    def __init__(self, *args: object, message: str = "") -> None:
        super().__init__(*args)
        if message:
            self.message = message

DuplicatingCaseId

Bases: BaseQasePluginException

Exception that signifies that incorrect case was set for test.

Source code in pytest_qaseio/plugin_exceptions.py
18
19
20
21
22
23
24
25
26
class DuplicatingCaseId(BaseQasePluginException):
    """Exception that signifies that incorrect case was set for test."""

    def __init__(self, duplicating_ids: list[int], *args: object) -> None:
        ids = ", ".join(str(i) for i in duplicating_ids)
        super().__init__(
            *args,
            message=f"Duplicating qase IDs found: {ids}",
        )

InvalidCaseId

Bases: BaseQasePluginException

Exception that signifies that incorrect case was set for test.

Source code in pytest_qaseio/plugin_exceptions.py
12
13
14
15
class InvalidCaseId(BaseQasePluginException):
    """Exception that signifies that incorrect case was set for test."""

    message = "Tests have incorrect cases ids. Please check logs"

MultipleIDsForTest

Bases: BaseQasePluginException

Exception that signifies that single test marked with multiple IDs.

Each test should be associated with exactly 1 case from qase.io for following reasons:

  • Atomic checks. It's easier to debug and fix
  • Adding support of multiple IDs to plugin will make it more complex.
Source code in pytest_qaseio/plugin_exceptions.py
29
30
31
32
33
34
35
36
37
38
39
40
class MultipleIDsForTest(BaseQasePluginException):
    """Exception that signifies that single test marked with multiple IDs.

    Each test should be associated with exactly 1 case from qase.io for
    following reasons:

    * Atomic checks. It's easier to debug and fix
    * Adding support of multiple IDs to plugin will make it more complex.

    """

    message = "Multiple qase IDs associated with single test"

RunNotConfigured

Bases: BaseQasePluginException

Exception that signifies that test run not configured.

Source code in pytest_qaseio/plugin_exceptions.py
43
44
45
46
class RunNotConfigured(BaseQasePluginException):
    """Exception that signifies that test run not configured."""

    message = "Test run not configured"