Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parametrize tests with concurrency backend #273

Merged
merged 3 commits into from
Aug 25, 2019

Conversation

florimondmanca
Copy link
Member

Fixes #271

Mostly adds a backend fixture and use it in the relevant tests, and some refactoring of HTTP/2 and connection pool tests to be more backend-agnostic as well.

I'm thinking that now we don't really test the usual path (e.g. not passing a backend to AsyncClient). This can be easily fixed by adding None as an extra backend to make AsyncClient & others use their default backend. This increases the duration of the test suite though (~20%?), so… any thoughts?

@florimondmanca florimondmanca force-pushed the test/backend-fixture branch 3 times, most recently from fc53532 to e8d87aa Compare August 24, 2019 08:08
Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

To fix the whole "cover the default case" issue let's have a single test-case that tests that when you don't pass a backend it's the AsyncioBackend and that the client is capable of making a request. I think that's sufficient to say that things work fine.

Other than that this looks pretty good to me. :)

tests/concurrency.py Show resolved Hide resolved
@florimondmanca
Copy link
Member Author

florimondmanca commented Aug 25, 2019

@sethmlarson Sounds fair — I added a test for the case when we're not specifying a backend. 👍

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

Looks good to me! Merge away 🎉

@florimondmanca florimondmanca merged commit 3674058 into master Aug 25, 2019
@florimondmanca florimondmanca deleted the test/backend-fixture branch August 25, 2019 18:25
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.

Backend test parametrization
2 participants