Home
last modified time | relevance | path

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

/third_party/node/deps/npm/node_modules/json-stringify-safe/
DMakefile16 autospec: target
33 .PHONY: test spec autotest autospec
/third_party/python/Lib/unittest/
Dmock.py1251 spec_set, autospec, new_callable, kwargs argument
1258 if autospec is not None:
1271 self.autospec = autospec
1280 self.autospec, self.new_callable, self.kwargs
1387 autospec, kwargs = self.autospec, self.kwargs
1396 if autospec is False:
1397 autospec = None
1399 if spec is not None and autospec is not None:
1401 if ((spec is not None or autospec is not None) and
1407 if new is DEFAULT and autospec is None:
[all …]
/third_party/python/Lib/unittest/test/testmock/
Dtestpatch.py638 @patch('%s.SomeClass' % __name__, object(), autospec=True)
940 test = patch(foo_name, autospec=True)(function)
948 test = patch.object(module, 'Foo', autospec=True)(function)
957 @patch('%s.function' % __name__, autospec=True)
977 @patch('%s.function' % __name__, autospec=True,
988 with patch('%s.Foo.static_method' % __name__, autospec=True) as method:
994 with patch('%s.Foo.class_method' % __name__, autospec=True) as method:
1000 patcher = patch('%s.function' % __name__, new=3, autospec=True)
1004 patcher = patch.object(module, 'function', new=3, autospec=True)
1012 patcher = patch(foo_name, autospec=Bar)
[all …]
Dtestwith.py133 with patch.object(c, 'f', autospec=True) as patch1:
134 with patch.object(c, 'f', autospec=True) as patch2:
Dtestasync.py186 @patch(async_foo_name, autospec=True)
191 @patch(async_foo_name, autospec=True)
236 with patch(f"{__name__}.async_func_args", autospec=True) as mock_method:
Dtestmock.py1976 with mock.patch(f'{__name__}.something', autospec=True) as mock_func:
1994 with mock.patch(f'{__name__}.Something.meth', autospec=True) as mocked:
2003 with mock.patch(f'{__name__}.something', autospec=True) as mocked:
2011 with mock.patch(f'{__name__}.Something', autospec=True) as mocked:
2165 with unittest.mock.patch.object(obj, 'obj_with_bool_func', autospec=True): pass
Dtesthelpers.py951 autospec = create_autospec(proxy)
952 self.assertFalse(hasattr(autospec, '__name__'))
/third_party/python/Doc/library/
Dunittest.mock.rst171 Auto-speccing can be done through the *autospec* argument to patch, or the
1335 .. function:: patch(target, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new…
1366 A more powerful form of *spec* is *autospec*. If you set ``autospec=True``
1376 Instead of ``autospec=True`` you can pass ``autospec=some_object`` to use an
1537 …target, attribute, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callabl…
1543 manager. Arguments *new*, *spec*, *create*, *spec_set*, *autospec* and
1686 .. function:: patch.multiple(target, spec=None, create=False, spec_set=None, autospec=None, new_cal…
1701 manager. The arguments *spec*, *spec_set*, *create*, *autospec* and
2337 :func:`create_autospec` and the *autospec* argument to :func:`patch`.
2390 If the mock was created with a *spec* (or *autospec* of course) then all the
[all …]
Dunittest.mock-examples.rst733 If you pass ``autospec=True`` to patch then it does the patching with a
746 >>> with patch.object(Foo, 'foo', autospec=True) as mock_foo:
754 If we don't use ``autospec=True`` then the unbound method is patched out
/third_party/python/Lib/idlelib/idle_test/
Dtest_squeezer.py319 @patch('idlelib.squeezer.Hovertip', autospec=Hovertip)
446 with patch('idlelib.squeezer.view_text', autospec=view_text)\
/third_party/python/Misc/
DNEWS13888 - bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound
14588 - bpo-28380: unittest.mock Mock autospec functions now properly support
16600 - bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound
18028 - bpo-28380: unittest.mock Mock autospec functions now properly support
20933 - bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound