-
-
Notifications
You must be signed in to change notification settings - Fork 150
Description
Python 3.8 added AsyncMock and added helpers equivalent to other assert helpers like assert_not_awaited, assert_awaited_with, etc. Currently diff support is added for Mocks. I guess it would be good to expand this to AsyncMock so that awaited calls also get better error messages. This would be similar to add to adding assert_wrapper for the helpers and patching the original helpers with this wrapped helpers as it's done now for. This is slightly related to #150 as it needs AsyncMock
which is Python 3.8+ and mock 4.0+ to be available and thus the code might need conditionals to accommodate for the relevant versions.
A commit implementing this : https://github.com/tirkarthi/pytest-mock/commit/97b5800eb75360eec3cabf4a26698c787a3609bb