Home
last modified time | relevance | path

Searched refs:new_callable (Results 1 – 14 of 14) sorted by relevance

/external/python/mock/mock/tests/
Dtestpatch.py1060 patcher = patch(foo_name, new_callable=NonCallableMagicMock)
1073 patcher = patch.object(Foo, 'f', new_callable=NonCallableMagicMock)
1091 patcher = patch(foo_name, new_callable=Bar, arg1=1, arg2=2)
1106 patcher = patch(foo_name, new_callable=Bar, spec=Bar)
1113 patcher = patch(foo_name, new_callable=Bar, spec_set=Bar)
1123 p = patch(non_existent_attr, new_callable=NonCallableMock)
1126 p = patch(non_existent_attr, new_callable=NonCallableMock,
1137 ValueError, patch, foo_name, new=object(), new_callable=MagicMock
1141 new_callable=MagicMock
1147 ValueError, patch, foo_name, new_callable=MagicMock,
[all …]
Dtesthelpers.py946 p = patch('%s.SomeClass.one' % __name__, new_callable=PropertyMock)
/external/python/cpython3/Lib/unittest/test/testmock/
Dtestpatch.py1079 patcher = patch(foo_name, new_callable=NonCallableMagicMock)
1092 patcher = patch.object(Foo, 'f', new_callable=NonCallableMagicMock)
1110 patcher = patch(foo_name, new_callable=Bar, arg1=1, arg2=2)
1125 patcher = patch(foo_name, new_callable=Bar, spec=Bar)
1132 patcher = patch(foo_name, new_callable=Bar, spec_set=Bar)
1142 p = patch(non_existent_attr, new_callable=NonCallableMock)
1145 p = patch(non_existent_attr, new_callable=NonCallableMock,
1156 ValueError, patch, foo_name, new=object(), new_callable=MagicMock
1160 new_callable=MagicMock
1166 ValueError, patch, foo_name, new_callable=MagicMock,
[all …]
Dtesthelpers.py977 p = patch('%s.SomeClass.one' % __name__, new_callable=PropertyMock)
/external/pdfium/third_party/pymock/
Dmock.py1118 spec_set, autospec, new_callable, kwargs argument
1120 if new_callable is not None:
1133 self.new_callable = new_callable
1147 self.autospec, self.new_callable, self.kwargs
1251 new_callable = self.new_callable
1294 if new_callable is not None:
1295 Klass = new_callable
1421 new_callable=None, **kwargs argument
1442 spec_set, autospec, new_callable, kwargs
1447 autospec=None, new_callable=None, **kwargs): argument
[all …]
/external/python/cpython2/Lib/test/
D_mock_backport.py1071 spec_set, autospec, new_callable, kwargs argument
1073 if new_callable is not None:
1086 self.new_callable = new_callable
1100 self.autospec, self.new_callable, self.kwargs
1197 new_callable = self.new_callable
1240 if new_callable is not None:
1241 Klass = new_callable
1372 new_callable=None, **kwargs argument
1390 spec_set, autospec, new_callable, kwargs
1395 autospec=None, new_callable=None, **kwargs): argument
[all …]
/external/python/cpython3/Lib/unittest/
Dmock.py1125 spec_set, autospec, new_callable, kwargs argument
1127 if new_callable is not None:
1140 self.new_callable = new_callable
1154 self.autospec, self.new_callable, self.kwargs
1251 new_callable = self.new_callable
1294 if new_callable is not None:
1295 Klass = new_callable
1429 new_callable=None, **kwargs argument
1447 spec_set, autospec, new_callable, kwargs
1452 autospec=None, new_callable=None, **kwargs): argument
[all …]
/external/python/mock/mock/
Dmock.py1226 spec_set, autospec, new_callable, kwargs argument
1228 if new_callable is not None:
1241 self.new_callable = new_callable
1255 self.autospec, self.new_callable, self.kwargs
1352 new_callable = self.new_callable
1395 if new_callable is not None:
1396 Klass = new_callable
1530 new_callable=None, **kwargs argument
1548 spec_set, autospec, new_callable, kwargs
1553 autospec=None, new_callable=None, **kwargs): argument
[all …]
/external/chromium-trace/catapult/devil/devil/utils/
Dmock_calls.py114 type(target), attribute, new_callable=mock.PropertyMock, **kwargs)
/external/python/cpython3/Doc/library/
Dunittest.mock.rst201 the *new_callable* argument to :func:`patch`.
800 >>> with patch('__main__.Foo.foo', new_callable=PropertyMock) as mock_foo:
1058 …t, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)
1083 *new_callable* allows you to specify a different class, or callable object,
1127 the :class:`Mock` (or *new_callable*) on construction.
1174 The *new_callable* argument is useful where you want to use an alternative
1179 >>> with patch('__main__.thing', new_callable=NonCallableMock) as mock_thing:
1193 >>> @patch('sys.stdout', new_callable=StringIO)
1253 …e, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)
1260 *new_callable* have the same meaning as for :func:`patch`. Like :func:`patch`,
[all …]
/external/python/cpython3/Lib/test/
Dtest_zipapp.py381 @patch('sys.stdout', new_callable=io.StringIO)
/external/python/cpython3/Lib/test/test_asyncio/
Dtest_base_events.py47 new_callable=mock_socket_module)(f)
Dtest_unix_events.py1152 new_callable=mock.Mock)
/external/chromium-trace/catapult/devil/devil/android/
Ddevice_utils_test.py172 'devil.android.device_utils.logger', new_callable=MockLogger)