Home
last modified time | relevance | path

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

/external/python/cpython3/Lib/unittest/test/testmock/
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.py1063 p = patch('%s.SomeClass.one' % __name__, new_callable=PropertyMock)
/external/python/mock/mock/tests/
Dtestpatch.py1050 patcher = patch(foo_name, new_callable=NonCallableMagicMock)
1063 patcher = patch.object(Foo, 'f', new_callable=NonCallableMagicMock)
1081 patcher = patch(foo_name, new_callable=Bar, arg1=1, arg2=2)
1096 patcher = patch(foo_name, new_callable=Bar, spec=Bar)
1103 patcher = patch(foo_name, new_callable=Bar, spec_set=Bar)
1113 p = patch(non_existent_attr, new_callable=NonCallableMock)
1116 p = patch(non_existent_attr, new_callable=NonCallableMock,
1127 ValueError, patch, foo_name, new=object(), new_callable=MagicMock
1131 new_callable=MagicMock
1137 ValueError, patch, foo_name, new_callable=MagicMock,
[all …]
Dtesthelpers.py1123 p = patch('%s.SomeClass.one' % __name__, new_callable=PropertyMock)
/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/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/mock/mock/
Dmock.py1251 spec_set, autospec, new_callable, kwargs argument
1253 if new_callable is not None:
1266 self.new_callable = new_callable
1280 self.autospec, self.new_callable, self.kwargs
1377 new_callable = self.new_callable
1420 if new_callable is not None:
1421 Klass = new_callable
1555 new_callable=None, **kwargs argument
1573 spec_set, autospec, new_callable, kwargs
1578 autospec=None, new_callable=None, **kwargs): argument
[all …]
/external/pigweed/pw_tokenizer/py/
Ddatabase_test.py235 @mock.patch('sys.stdout', new_callable=_mock_output)
261 @mock.patch('sys.stdout', new_callable=_mock_output)
/external/python/cpython3/Lib/unittest/
Dmock.py1251 spec_set, autospec, new_callable, kwargs argument
1253 if new_callable is not None:
1266 self.new_callable = new_callable
1280 self.autospec, self.new_callable, self.kwargs
1388 new_callable = self.new_callable
1433 if new_callable is not None:
1434 Klass = new_callable
1571 new_callable=None, **kwargs argument
1593 spec_set, autospec, new_callable, kwargs
1598 autospec=None, new_callable=None, **kwargs): argument
[all …]
/external/chromium-trace/catapult/devil/devil/utils/
Dmock_calls.py115 type(target), attribute, new_callable=mock.PropertyMock, **kwargs)
/external/python/cpython3/Doc/library/
Dunittest.mock.rst225 the *new_callable* argument to :func:`patch`.
836 >>> with patch('__main__.Foo.foo', new_callable=PropertyMock) as mock_foo:
1335 …t, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)
1362 *new_callable* allows you to specify a different class, or callable object,
1407 :class:`MagicMock` otherwise or to *new_callable* if specified.
1454 The *new_callable* argument is useful where you want to use an alternative
1459 >>> with patch('__main__.thing', new_callable=NonCallableMock) as mock_thing:
1473 >>> @patch('sys.stdout', new_callable=StringIO)
1537 …e, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)
1544 *new_callable* have the same meaning as for :func:`patch`. Like :func:`patch`,
[all …]
/external/python/cpython3/Lib/idlelib/idle_test/
Dtest_run.py333 new_callable=Func) as func:
Dtest_configdialog.py97 new_callable=Func) as view:
/external/python/cpython3/Lib/test/
Dtest_zipapp.py381 @patch('sys.stdout', new_callable=io.StringIO)
/external/toolchain-utils/crosperf/
Dexperiment_runner_unittest.py413 @mock.patch('builtins.open', new_callable=mock.mock_open)
/external/python/cpython3/Lib/test/test_asyncio/
Dtest_unix_events.py1192 new_callable=mock.Mock)
Dtest_base_events.py50 new_callable=mock_socket_module)(f)
/external/chromium-trace/catapult/devil/devil/android/
Ddevice_utils_test.py200 'devil.android.device_utils.logger', new_callable=MockLogger)