Home
last modified time | relevance | path

Searched refs:mock_method (Results 1 – 11 of 11) sorted by relevance

/aosp_15_r20/prebuilts/build-tools/common/py3-stdlib/unittest/test/testmock/
H A Dtestasync.py62 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 Dtestmock.py1629 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/
Dtestasync.py62 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 …]
Dtestmock.py1629 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 Dmox.py500 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 Dmox.py500 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 Dtest_executorch_custom_ops.py114 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/
Dsmp_test.py301 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 Dsource_locator_unittest.py556 def test___init__(self, mock_base_init, mock_method): argument
563 self.assertTrue(mock_method.called)
/aosp_15_r20/external/python/cpython3/Doc/library/
Dunittest.mock-examples.rst441 ... 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)
Dunittest.mock.rst128 >>> 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)