asynctest
asynctest copied to clipboard
Current status of the `asynctest`
First of all, I would like to thanks author and contributors for this cool library.
We are using it heavily in our codebase. Currently, we are in the middle of upgrading our source to python3.8/3.9
and many of our existing test-cases are failing. It looks like asynctest
is yet to support python3.8/3.9
(Ref Martiusweb/asynctest#144, Martiusweb/asynctest#151, Martiusweb/asynctest#132).
I can see py3.8
branch with last commit (and master
too) long back. So, I would like to know the status and the roadmap of project. As mentioned in, beiniu/brother#18 , is unittest.mock.AsyncMock
official recommendation ?
Thanks again.
ping @Martiusweb ; it would be good to get clarification whether this testing library is going to be maintained going forward, or projects should migrate to stdlib or other testing tools.
I'm working on porting asynctest to stdlib, but there seems to be lack of demand.
Please consider upvoting / commenting https://github.com/python/cpython/pull/20759
Hi,
First of all, sorry for the very late reply.
To keep things short: I'll not work on asynctest anymore, and I believe unittest.mock.AsyncMock in combination with pytest is probably your best bet for now.
I'm sorry that I can't provide a better answer, and that I've abandoned this library. I wish I could help to propose a migration plan, but I haven't been able to find enough time/momentum to do that when AsyncMock has been introduced in the stdlib. I haven't worked on a python project in the last 3-4 years and it became impossible for me to keep up with the changes in Python and asyncio.
Thanks for the clarification. We can understand. Keep up the good work !
For what it's worth, asynctest apparently supports use cases that AsyncMock does not: https://stackoverflow.com/questions/53508368/python-unit-testing-nested-async-with-how-to-mock-patch