/aosp_15_r20/prebuilts/build-tools/common/py3-stdlib/unittest/test/testmock/ |
H A D | testasync.py | 62 def test_async(mock_method): argument 63 self.assertTrue(iscoroutinefunction(mock_method)) 68 def test_async(mock_method): argument 69 m = mock_method() 74 def test_no_parent_attribute(mock_method): argument 75 m = mock_method() 84 def test_async(mock_method): argument 85 self.assertIsInstance(mock_method, AsyncMock) 91 def test_async(mock_method): argument 92 self.assertIsInstance(mock_method, AsyncMock) [all …]
|
H A D | testmock.py | 1629 mock_method = mock.create_autospec(getattr(TestClass, method)) 1630 mock_method() 1631 mock_method.assert_called_once_with() 1632 self.assertRaises(TypeError, mock_method, 'extra_arg')
|
/aosp_15_r20/external/python/cpython3/Lib/unittest/test/testmock/ |
D | testasync.py | 62 def test_async(mock_method): argument 63 self.assertTrue(iscoroutinefunction(mock_method)) 68 def test_async(mock_method): argument 69 m = mock_method() 74 def test_no_parent_attribute(mock_method): argument 75 m = mock_method() 84 def test_async(mock_method): argument 85 self.assertIsInstance(mock_method, AsyncMock) 91 def test_async(mock_method): argument 92 self.assertIsInstance(mock_method, AsyncMock) [all …]
|
D | testmock.py | 1629 mock_method = mock.create_autospec(getattr(TestClass, method)) 1630 mock_method() 1631 mock_method.assert_called_once_with() 1632 self.assertRaises(TypeError, mock_method, 'extra_arg')
|
/aosp_15_r20/external/protobuf/python/ |
H A D | mox.py | 500 mock_method = self._CreateMockMethod('__call__') 501 return mock_method(*params, **named_params) 1194 def AddMethod(self, mock_method): argument 1197 def MethodCalled(self, mock_method): argument 1214 def AddMethod(self, mock_method): argument 1221 self._methods.append(mock_method) 1223 def MethodCalled(self, mock_method): argument 1242 if method == mock_method: 1247 self._methods.remove(mock_method) 1251 mock_method._call_queue.appendleft(self) [all …]
|
/aosp_15_r20/external/cronet/third_party/protobuf/python/ |
H A D | mox.py | 500 mock_method = self._CreateMockMethod('__call__') 501 return mock_method(*params, **named_params) 1194 def AddMethod(self, mock_method): argument 1197 def MethodCalled(self, mock_method): argument 1214 def AddMethod(self, mock_method): argument 1221 self._methods.append(mock_method) 1223 def MethodCalled(self, mock_method): argument 1242 if method == mock_method: 1247 self._methods.remove(mock_method) 1251 mock_method._call_queue.appendleft(self) [all …]
|
/aosp_15_r20/external/pytorch/tools/test/ |
H A D | test_executorch_custom_ops.py | 114 self, unused: Mock, mock_method: Mock 127 mock_method.assert_called_once_with( 134 self, unused: Mock, mock_method: Mock 147 mock_method.assert_not_called()
|
/aosp_15_r20/external/python/bumble/tests/ |
D | smp_test.py | 301 with mock.patch.object(session, 'send_command') as mock_method: 304 actual_command = mock_method.call_args.args[0]
|
/aosp_15_r20/tools/asuite/aidegen/lib/ |
H A D | source_locator_unittest.py | 556 def test___init__(self, mock_base_init, mock_method): argument 563 self.assertTrue(mock_method.called)
|
/aosp_15_r20/external/python/cpython3/Doc/library/ |
D | unittest.mock-examples.rst | 441 ... def test_something(self, mock_method): 443 ... mock_method.assert_called_with() 483 >>> with patch.object(ProductionClass, 'method') as mock_method: 484 ... mock_method.return_value = None 488 >>> mock_method.assert_called_with(1, 2, 3)
|
D | unittest.mock.rst | 128 >>> with patch.object(ProductionClass, 'method', return_value=None) as mock_method: 132 >>> mock_method.assert_called_once_with(1, 2, 3) 1561 ... def test(mock_method): 1563 ... mock_method.assert_called_with(3)
|