File: error.py

package info (click to toggle)
python-test-server 0.0.43-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 288 kB
  • sloc: python: 1,413; makefile: 7
file content (29 lines) | stat: -rw-r--r-- 784 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
__all__ = [
    "TestServerError",
    "WaitTimeoutError",
    "InternalError",
    "RequestNotProcessedError",
    "NoResponseError",
]


class TestServerError(Exception):
    """Base class for all errrors raised by test_server package."""

    __test__ = False  # for pytest ignore this class


class WaitTimeoutError(TestServerError):
    """Raised by wait_request method if timed out waiting a request done."""


class InternalError(TestServerError):
    """Raised when exception happens during the processing a request sent by client."""


class RequestNotProcessedError(TestServerError):
    """Raised by get_request method when no request has been processed."""


class NoResponseError(TestServerError):
    """Raised when no response data is configured to hande a request."""