Skip to content

Commit fef0b8d

Browse files
committed
Fix unit tests
1 parent d4a7184 commit fef0b8d

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

sqlalchemy_drill/drilldbapi/_drilldbapi.py

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,45 @@
2424
from requests import Session, Response
2525

2626
from . import api_globals
27-
from .api_exceptions import (AuthError, ConnectionClosedException, CursorClosedException,
28-
DatabaseError, ProgrammingError)
27+
from .api_exceptions import (
28+
AuthError,
29+
ConnectionClosedException,
30+
CursorClosedException,
31+
DatabaseError,
32+
DrillWarning,
33+
Error,
34+
IntegrityError,
35+
InterfaceError,
36+
InternalError,
37+
NotSupportedError,
38+
OperationalError,
39+
ProgrammingError,
40+
)
41+
42+
# DB-API 2.0 requires Warning to be exported at module level
43+
# We renamed it to DrillWarning to avoid shadowing built-in, but alias it here
44+
Warning = DrillWarning # noqa: A001 # pylint: disable=redefined-builtin
45+
46+
# Explicit exports for DB-API 2.0 compliance
47+
__all__ = [
48+
# Module globals
49+
'apilevel', 'threadsafety', 'paramstyle',
50+
# Classes
51+
'Connection', 'Cursor',
52+
# Functions
53+
'connect',
54+
# Type objects
55+
'STRING', 'BINARY', 'NUMBER', 'DATETIME', 'ROWID',
56+
'BOOL', 'SMALLINT', 'INTEGER', 'LONG', 'FLOAT', 'NUMERIC',
57+
'DATE', 'TIME', 'TIMESTAMP', 'INTERVAL',
58+
# Type constructors
59+
'Date', 'Time', 'Timestamp', 'DateFromTicks', 'TimeFromTicks', 'TimestampFromTicks', 'Binary',
60+
# Exceptions (DB-API 2.0 required)
61+
'Warning', 'Error', 'InterfaceError', 'DatabaseError', 'OperationalError',
62+
'IntegrityError', 'InternalError', 'ProgrammingError', 'NotSupportedError',
63+
# Additional exceptions
64+
'AuthError', 'CursorClosedException', 'ConnectionClosedException',
65+
]
2966

3067
apilevel = '2.0'
3168
threadsafety = 3

0 commit comments

Comments
 (0)