Skip to content

pytest.mark.asyncio with pytest.mark.parametrize may break async #379

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

Closed
SamShao-crypto opened this issue Jul 1, 2022 · 3 comments
Closed

Comments

@SamShao-crypto
Copy link

SamShao-crypto commented Jul 1, 2022

when i use pytest.mark.asyncio with pytest.mark.parametrize,the async logic break

@SamShao-crypto
Copy link
Author

SamShao-crypto commented Jul 1, 2022

  • [ ]

Screen Shot 2022-07-01 at 12 19 04 PM

@SamShao-crypto
Copy link
Author

total exhaust 6 sec,but expected lower than 6 (which is the time spending for serial)

@seifertm
Copy link
Contributor

This is the expected behavior. pytest-asyncio creates a synchronous wrapper function for each async test case. The tests do not run concurrently.

There's an existing feature request for tests that run concurrently. I'll close this in favor of #69. Feel free to continue the discussion there.

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

No branches or pull requests

2 participants