-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support for async functions with mock_callable() #19
Comments
Hi @fornellas, I have a question about this, in order to support asyncio, the whole module would have to drop python2 support right? |
I suppose you're correct. Python 2 is dying anyway, it's support can be dropped at this point. |
PS: I created a milestone for async stuff https://github.com/facebookincubator/TestSlide/milestone/1, as there's more stuff to implement. |
@fried, what do you think about the approach of using |
I've put up #60 to provide |
unittest.IsolatedAsyncioTestCase in 3.8 uses that. So to have async test methods they have to explicitly be coroutines. No sync methods that return awaitables, since that's pretty hairy. |
Support for async functions with
mock_callable()
.Here's a half working patch for that, as a starting point.
To prove that any solution works, all relevant tests at
tests/mock_callable_testslide.py
must be updated to to cover async cases (eg: async function at module, async instance method, async class method etc).PS: previous PR #8
The text was updated successfully, but these errors were encountered: