Skip to content

Deindent test assertions - #1783

Merged
aaugustin merged 2 commits into
mainfrom
deintent-test-assertions
Oct 19, 2026
Merged

aaugustin merged 2 commits into
mainfrom
deintent-test-assertions

Conversation

@aaugustin

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@aaugustin
aaugustin merged commit f6702a5 into main Oct 19, 2026
9 checks passed
@aaugustin
aaugustin deleted the deintent-test-assertions branch October 19, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants