Searched refs:new_callable (Results 1 – 9 of 9) sorted by relevance
/third_party/python/Lib/unittest/test/testmock/ |
D | testpatch.py | 1060 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 …]
|
D | testhelpers.py | 1063 p = patch('%s.SomeClass.one' % __name__, new_callable=PropertyMock)
|
/third_party/python/Lib/unittest/ |
D | mock.py | 1273 spec_set, autospec, new_callable, kwargs, *, unsafe=False argument 1275 if new_callable is not None: 1298 self.new_callable = new_callable 1312 self.autospec, self.new_callable, self.kwargs 1420 new_callable = self.new_callable 1465 if new_callable is not None: 1466 Klass = new_callable 1615 new_callable=None, *, unsafe=False, **kwargs argument 1637 spec_set, autospec, new_callable, kwargs, unsafe=unsafe 1642 autospec=None, new_callable=None, **kwargs): argument [all …]
|
/third_party/python/Lib/idlelib/idle_test/ |
D | test_run.py | 60 new_callable=lambda: (lambda t, e: None)) 374 new_callable=Func) as func:
|
D | test_configdialog.py | 97 new_callable=Func) as view:
|
/third_party/python/Doc/library/ |
D | unittest.mock.rst | 225 the *new_callable* argument to :func:`patch`. 837 >>> with patch('__main__.Foo.foo', new_callable=PropertyMock) as mock_foo: 1336 …t, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs) 1363 *new_callable* allows you to specify a different class, or callable object, 1408 :class:`MagicMock` otherwise or to *new_callable* if specified. 1455 The *new_callable* argument is useful where you want to use an alternative 1460 >>> with patch('__main__.thing', new_callable=NonCallableMock) as mock_thing: 1474 >>> @patch('sys.stdout', new_callable=StringIO) 1538 …e, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs) 1545 *new_callable* have the same meaning as for :func:`patch`. Like :func:`patch`, [all …]
|
/third_party/python/Lib/test/ |
D | test_zipapp.py | 381 @patch('sys.stdout', new_callable=io.StringIO)
|
/third_party/python/Lib/test/test_asyncio/ |
D | test_unix_events.py | 1186 new_callable=mock.Mock)
|
D | test_base_events.py | 51 new_callable=mock_socket_module)(f)
|