Home
last modified time | relevance | path

Searched refs:AsyncMock (Results 1 - 7 of 7) sorted by relevance

/third_party/python/Lib/unittest/test/testmock/
H A Dtestasync.py13 from unittest.mock import (ANY, call, AsyncMock, patch, MagicMock, Mock, namespace
85 self.assertIsInstance(mock_method, AsyncMock)
92 self.assertIsInstance(mock_method, AsyncMock)
99 self.assertIsInstance(mock_method, AsyncMock)
110 self.assertIsInstance(async_func, AsyncMock)
111 self.assertIsInstance(async_func_args, AsyncMock)
140 self.assertIsInstance(mock_method, AsyncMock)
146 with patch(f"{__name__}.async_func", AsyncMock()):
147 self.assertIsInstance(async_func, AsyncMock)
172 mock = AsyncMock()
[all...]
H A Dtestmagicmethods.py5 from unittest.mock import AsyncMock, Mock, MagicMock, _magics namespace
274 mock = AsyncMock()
290 self.assertIsInstance(mock.__aenter__, AsyncMock)
291 self.assertIsInstance(mock.__aexit__, AsyncMock)
316 self.assertIsInstance(mock.__aenter__, AsyncMock)
317 self.assertIsInstance(mock.__aexit__, AsyncMock)
H A Dtestmock.py13 NonCallableMagicMock, AsyncMock, _Call, _CallList,
1840 AsyncMock):
2213 Mock, MagicMock, NonCallableMock, NonCallableMagicMock, AsyncMock
/third_party/mesa3d/bin/
H A Dgen_release_notes_test.py27 # AsyncMock is new in 3.8, so if we're using an older version we need the
153 mock_com = mock.AsyncMock(return_value=(textwrap.dedent(content).encode(), ''))
156 mock_exec = mock.AsyncMock(return_value=mock_p)
159 mock.patch('bin.gen_release_notes.gather_commits', mock.AsyncMock(return_value='sha\n')):
/third_party/python/Lib/unittest/
H A Dmock.py16 'AsyncMock',
54 if _is_instance_mock(obj) and not isinstance(obj, AsyncMock):
1030 return AsyncMock(**kw)
1034 # Any asynchronous magic becomes an AsyncMock
1035 klass = AsyncMock
1039 # Any synchronous method on AsyncMock becomes a MagicMock
1042 klass = AsyncMock
1178 # executed separately from their call, also AsyncMock overrides this method
1467 Klass = AsyncMock
1482 Klass = AsyncMock
2387 class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock): global() class
[all...]
/third_party/python/Lib/test/
H A Dtest_inspect.py208 inspect.iscoroutinefunction(unittest.mock.AsyncMock()))
220 inspect.isgeneratorfunction(unittest.mock.AsyncMock()))
232 inspect.isasyncgenfunction(unittest.mock.AsyncMock()))
3297 unittest.mock.AsyncMock(),
/third_party/python/Lib/test/test_asyncio/
H A Dtest_tasks.py1740 self.assertTrue(asyncio.iscoroutinefunction(mock.AsyncMock()))

Completed in 18 milliseconds