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
Actual behavior: callee.called is one, and a warning is produced:
tests/test_basics.py::test_demo
/usr/lib64/python3.11/asyncio/events.py:80: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
self._context.run(self._callback, *self._args)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
I'm calling this behavior incorrect (or at least unhelpful) because if I were to use a real coroutine instead of async_stub(), the body never would have executed.
The text was updated successfully, but these errors were encountered:
Can you please replace the mocker fixture to use unittest.mock instead? That is helpful to see if the problem lies with pytest-mock or with unittest.mock itself.
(
event_loop
from pytest-asyncio)Expected behavior:
callee.called
should be zeroActual behavior:
callee.called
is one, and a warning is produced:I'm calling this behavior incorrect (or at least unhelpful) because if I were to use a real coroutine instead of
async_stub()
, the body never would have executed.The text was updated successfully, but these errors were encountered: