-
Notifications
You must be signed in to change notification settings - Fork 41
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
How to properly use assertAsyncRaises #143
Comments
Additionally, the below works:
But this only works when in isolation in its own test.
|
Hello,
It's actually a very simple shorthand: https://asynctest.readthedocs.io/en/latest/_modules/asynctest/case.html#TestCase.assertAsyncRaises assertAsyncRaises don't accept the coroutine function + args for several reasons:
It's true that the doc is very light though, I'll update it. |
Thanks! I think just an example added to the docs would be great! |
Hi,
Im having a bit of trouble using
assertAsyncRaises
. I have read the docs and tried various things:Here is how I would usually write a test for the dummy function
x
.Using
asynctest
:I would except just the first/last example should work; I would assume it would look something like this under the hood:
The text was updated successfully, but these errors were encountered: