You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: