Skip to content

Commit 98b7860

Browse files
Update test docstrings to use the public LEADER_ERROR_CODES name
The previous cycle dropped the underscore-prefixed aliases (_LEADER_CHANGE_CODES in the SA dialect, _LEADER_ERROR_CODES in the client) in favor of the wire layer's public LEADER_ERROR_CODES name. Two test files retained the old aliases in their module docstrings, referencing names that no longer exist anywhere in source. Anyone grepping for the old names hit these comments without finding the constant. Replace the literal _LEADER_CHANGE_CODES and _LEADER_ERROR_CODES in the docstrings with LEADER_ERROR_CODES. Pure text edit; no test or runtime change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0a6867a commit 98b7860

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_connection_protocol_error_propagation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Lines covered (pre-pragma):
55
66
- connection.py:408 — ``connect()`` re-raises ``OperationalError``
7-
whose code is NOT in ``_LEADER_ERROR_CODES`` (leader-change
7+
whose code is NOT in ``LEADER_ERROR_CODES`` (leader-change
88
errors translate to ``DqliteConnectionError`` for the pool's
99
reconnect-elsewhere flow; non-leader errors propagate as-is).
1010
- connection.py:531 — ``_abort_protocol`` no-protocol early

tests/test_server_failure_mid_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
The dbapi layer then maps ``client.ProtocolError`` to
1111
``InterfaceError``, breaking ``sqlalchemy-dqlite``'s ``is_disconnect``
1212
check which tests ``isinstance(e, OperationalError) and e.code in
13-
_LEADER_CHANGE_CODES``. Leadership-loss during a streaming SELECT would
13+
LEADER_ERROR_CODES``. Leadership-loss during a streaming SELECT would
1414
not trigger SA pool invalidation.
1515
1616
Catching ``ServerFailure`` before the generic ``_WireProtocolError``

0 commit comments

Comments
 (0)