-
Notifications
You must be signed in to change notification settings - Fork 141
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
Can't async mock a method in a context manager #794
Comments
This is the issue tracker for pytest-asyncio, a pytest plugin to simplify running of asyncio code in tests. I don't see how your code example has anything to do with pytest-asyncio or event pytest. Maybe you've posted this in the wrong project? That said, your error message is caused by the fact that |
Get the same error for my test function: main logic fn:
test fn:
error:
|
Small note to whoever might find it useful:
|
Code to reproduce the error (with python>3.11)
error: TypeError: 'coroutine' object does not support the asynchronous context manager protocol
The text was updated successfully, but these errors were encountered: