Coverage for src/pytest_samples/database/_exceptions.py: 100%
9 statements
« prev ^ index » next coverage.py v7.4.2, created at 2024-02-20 19:47 +0000
« prev ^ index » next coverage.py v7.4.2, created at 2024-02-20 19:47 +0000
1__all__ = [
2 "DatabaseError", "IntegrityError", "MultipleResultsFound",
3 "NoResultFound",
4 "DetachedInstanceError",
5 "InactiveSessionError",
6 "RelativePathError",
7 "EngineDisposedError"
8]
10from sqlalchemy.exc import DatabaseError, IntegrityError, \
11 MultipleResultsFound, NoResultFound
12from sqlalchemy.orm.exc import DetachedInstanceError
15class InactiveSessionError(RuntimeError):
16 """An exception that is raised when an inactive session was
17 accessed.
18 """
19 pass
22class RelativePathError(OSError):
23 """An exception that is raised when a relative path is provided to
24 construct the engine.
25 """
26 pass
29class EngineDisposedError(RuntimeError):
30 """An exception that is raised when an `Engine` is accessed after
31 it was disposed.
32 """
33 pass