Home
last modified time | relevance | path

Searched refs:create_autospec (Results 1 – 20 of 20) sorted by relevance

/external/python/mock/mock/tests/
Dtesthelpers.py9 call, create_autospec, MagicMock,
346 mock = create_autospec(SomeClass)
348 mock = create_autospec(SomeClass())
355 mock = create_autospec(f, return_value='foo')
361 mock = create_autospec(Foo, return_value='foo')
366 m = create_autospec(int)
390 klass = create_autospec(Foo)
403 m = create_autospec(Foo, a='3')
413 m = create_autospec(foo)
427 mock = create_autospec(obj)
[all …]
Dtestcallable.py10 NonCallableMock, patch, create_autospec,
139 mock = create_autospec(X)
143 mock = create_autospec(X())
148 mock = create_autospec(SomeClass, instance=True)
Dtestmock.py18 create_autospec
190 mock = create_autospec(f)
196 mock = create_autospec(f)
206 mock = create_autospec(f)
1254 create_autospec(f),
1255 create_autospec(obj).f
1267 m = mock.create_autospec(object(), name='sweet_func')
/external/python/cpython3/Lib/unittest/test/testmock/
Dtesthelpers.py7 call, _Call, create_autospec, MagicMock,
365 mock = create_autospec(SomeClass)
367 mock = create_autospec(SomeClass())
374 mock = create_autospec(f, return_value='foo')
380 mock = create_autospec(Foo, return_value='foo')
385 m = create_autospec(int)
410 klass = create_autospec(Foo)
423 m = create_autospec(Foo, a='3')
431 m = create_autospec(foo)
446 mock = create_autospec(obj)
[all …]
Dtestcallable.py10 NonCallableMock, patch, create_autospec,
132 mock = create_autospec(X)
136 mock = create_autospec(X())
141 mock = create_autospec(SomeClass, instance=True)
Dtestmock.py12 create_autospec
166 mock = create_autospec(f)
172 mock = create_autospec(f)
182 mock = create_autospec(f)
1391 create_autospec(f),
1392 create_autospec(obj).f
1404 m = mock.create_autospec(object(), name='sweet_func')
1808 mock.child = create_autospec(foo)
/external/autotest/client/bin/
Dbase_sysinfo_unittest.py25 mock.create_autospec(base_sysinfo.loggable),
26 mock.create_autospec(base_sysinfo.loggable),
34 failing_loggable = mock.create_autospec(base_sysinfo.loggable)
37 mock.create_autospec(base_sysinfo.loggable),
39 mock.create_autospec(base_sysinfo.loggable),
/external/autotest/server/hosts/
Dafe_store_unittest.py19 self.mock_afe = mock.create_autospec(frontend.AFE, instance=True)
30 mock_host = mock.create_autospec(frontend.Host, instance=True)
132 self.mock_afe = mock.create_autospec(frontend.AFE, instance=True)
143 mock_host = mock.create_autospec(frontend.Host, instance=True)
/external/python/mock/
DNEWS51 - Issue #21222: Passing name keyword argument to mock.create_autospec now
55 create_autospec now works. Patch by Kushal Das.
58 create_autospec now works. Patch by Kushal Das.
/external/autotest/site_utils/
Dtest_push_unittest.py19 retry.retry = mock.create_autospec(retry.retry, return_value=lambda func: func)
/external/pdfium/third_party/pymock/
Dmock.py679 result = create_autospec(
1348 new = create_autospec(autospec, spec_set=spec_set,
2135 def create_autospec(spec, spec_set=False, instance=False, _parent=None, function
2199 mock.return_value = create_autospec(spec, spec_set, instance=True,
2298 type(create_autospec),
/external/python/cpython2/Lib/test/
D_mock_backport.py598 result = create_autospec(
1294 new = create_autospec(autospec, spec_set=spec_set,
2085 def create_autospec(spec, spec_set=False, instance=False, _parent=None, function
2153 mock.return_value = create_autospec(spec, spec_set, instance=True,
2256 type(create_autospec),
/external/python/cpython3/Lib/unittest/
Dmock.py614 result = create_autospec(
1348 new = create_autospec(autospec, spec_set=spec_set,
2149 def create_autospec(spec, spec_set=False, instance=False, _parent=None, function
2217 mock.return_value = create_autospec(spec, spec_set, instance=True,
2320 type(create_autospec),
/external/python/mock/mock/
Dmock.py722 result = create_autospec(
1449 new = create_autospec(autospec, spec_set=spec_set,
2265 def create_autospec(spec, spec_set=False, instance=False, _parent=None, function
2333 mock.return_value = create_autospec(spec, spec_set, instance=True,
2439 type(create_autospec),
/external/python/cpython3/Doc/library/
Dunittest.mock.rst156 :func:`create_autospec` function. Auto-speccing creates mock objects that
164 >>> from unittest.mock import create_autospec
168 >>> mock_function = create_autospec(function, return_value='fishy')
177 :func:`create_autospec` can also be used on classes, where it copies the signature of
1094 spec as the class. See the :func:`create_autospec` function and
1989 create_autospec section in Helpers
1992 .. function:: create_autospec(spec, spec_set=False, instance=False, **kwargs)
2009 :func:`create_autospec` also takes arbitrary keyword arguments that are passed to
2013 :func:`create_autospec` and the *autospec* argument to :func:`patch`.
2248 :func:`patch` / :func:`patch.object` or use the :func:`create_autospec` function to create a
[all …]
/external/python/cpython3/Misc/NEWS.d/
D3.6.0a4.rst267 unittest.mock.create_autospec() now works properly for subclasses of
D3.7.3rc1.rst446 Calls to a child function created with :func:`unittest.mock.create_autospec`
D3.5.3rc1.rst1177 unittest.mock.create_autospec() now works properly for subclasses of
D3.5.0a1.rst3973 Passing name keyword argument to mock.create_autospec now works.
4004 create_autospec now works. Patch by Kushal Das.
/external/python/cpython3/Misc/
DHISTORY1958 - Issue #21222: Passing name keyword argument to mock.create_autospec now
1969 create_autospec now works. Patch by Kushal Das.