Repository navigation
Deindent test assertions - #1783
Merged
Merged
Conversation
aaugustin
commented
Oct 19, 2026
Member
- Deindent assertions on raised exceptions.
- Deindent more test assertions.
* Standardize on the style with the least amount of indentation. * Skip a line between test assertions consistently.
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues remain.
No open issues 🎉
What changed in this PR
This PR standardizes test assertion indentation and formatting across Trio, sync, asyncio, protocol, stream, and HTTP/1.1 tests.
Changes:
- Moves exception assertions outside cleanup and exception-capture contexts.
- Reformats selected multiline assertions.
- Improves test readability without changing behavior.
| File | Description |
|---|---|
tests/trio/test_server.py |
Deindents server assertions |
tests/trio/test_router.py |
Deindents router assertions |
tests/trio/test_connection.py |
Deindents connection assertions |
tests/trio/test_client.py |
Deindents client assertions |
tests/test_streams.py |
Deindents stream assertions |
tests/test_protocol.py |
Deindents protocol assertions |
tests/test_http11.py |
Deindents and reformats HTTP assertions |
tests/sync/test_server.py |
Deindents server assertions |
tests/sync/test_router.py |
Deindents router assertions |
tests/sync/test_connection.py |
Deindents connection assertions |
tests/sync/test_client.py |
Deindents client assertions |
tests/asyncio/test_server.py |
Deindents server assertions |
tests/asyncio/test_router.py |
Deindents router assertions |
tests/asyncio/test_connection.py |
Deindents connection assertions |
tests/asyncio/test_client.py |
Deindents client assertions |
Review effort: Lite
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.