Lines Matching defs:mock
20 import unittest.mock
206 inspect.iscoroutinefunction(unittest.mock.Mock()))
208 inspect.iscoroutinefunction(unittest.mock.AsyncMock()))
218 inspect.isgeneratorfunction(unittest.mock.Mock()))
220 inspect.isgeneratorfunction(unittest.mock.AsyncMock()))
230 inspect.isasyncgenfunction(unittest.mock.Mock()))
232 inspect.isasyncgenfunction(unittest.mock.AsyncMock()))
571 with unittest.mock.patch('inspect.getabsfile', _getabsfile):
2668 with unittest.mock.patch('inspect.ismethoddescriptor', _isdesc):
2670 # Make sure that our mock setup is working
3295 for mock in (
3296 unittest.mock.Mock(),
3297 unittest.mock.AsyncMock(),
3298 unittest.mock.MagicMock(),
3300 with self.subTest(mock=mock):
3301 self.assertEqual(str(inspect.signature(mock)), '(*args, **kwargs)')
3304 for mock in (
3305 unittest.mock.NonCallableMock(),
3306 unittest.mock.NonCallableMagicMock(),
3308 with self.subTest(mock=mock):
3310 inspect.signature(mock)