Skip to content

Group async and sync tests into separate test classes - #29

Merged
brandur merged 1 commit into
masterfrom
brandur-group-tests
Jul 6, 2024
Merged

Group async and sync tests into separate test classes#29
brandur merged 1 commit into
masterfrom
brandur-group-tests

Conversation

@brandur

@brandur brandur commented Jul 6, 2024

Copy link
Copy Markdown
Contributor

Group async and sync tests into separate test classes like TestClient
and TestAsyncClient. Along with organizing things more clearly, the
major advantage of this is that we can localize fixtures to the specific
classes where they're useful. So instead of client and client_async,
we just have client in both both test classes. This is not only more
clear, but greatly reduces errors because it's not possible to use the
wrong fixture, and makes tests more copy/pastable.

Group async and sync tests into separate test classes like `TestClient`
and `TestAsyncClient`. Along with organizing things more clearly, the
major advantage of this is that we can localize fixtures to the specific
classes where they're useful. So instead of `client` and `client_async`,
we just have `client` in both both test classes. This is not only more
clear, but greatly reduces errors because it's not possible to use the
wrong fixture, and makes tests more copy/pastable.
@brandur
brandur merged commit e8ffe06 into master Jul 6, 2024
@brandur
brandur deleted the brandur-group-tests branch July 6, 2024 22:50
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.

1 participant