Python(fix): pytest exit instead of raise on connection fail#606
Merged
alexluck-sift merged 1 commit intoJun 2, 2026
Merged
Conversation
Contributor
|
Python docs preview: https://sift-stack.github.io/sift/python/pr-606/ Deployed from |
ian-sift
approved these changes
Jun 2, 2026
e5f397c
into
al/python/feat/pytest-dev-branch
19 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On a failed connectivity ping in online mode, the pytest plugin now aborts the session with
pytest.exitinstead of raisingpytest.UsageError.Previously the ping ran during the first gated test's setup, so a session-scoped fixture failure was cached and re-raised once per test. A connection failure produced one error block per collected test, with the gRPC error truncated in the summary lines.
pytest.exitstops the session on the spot and prints the message once, before any test body runs, with the full error untruncated. The message text and exit code (4) are unchanged.Notes
The check stays in the
report_contextfixture rather than moving to a collection hook, so the user-overridablesift_clientandclient_has_connectionfixtures still resolve as documented.