Home
last modified time | relevance | path

Searched refs:side_effect (Results 1 – 25 of 111) sorted by relevance

12345

/external/llvm/test/Transforms/JumpThreading/
Dimplied-cond.ll3 declare void @side_effect(i32)
8 call void @side_effect(i32 0)
18 ; CHECK: call void @side_effect
20 ; CHECK: call void @side_effect
21 call void @side_effect(i32 0)
26 call void @side_effect(i32 0)
31 call void @side_effect(i32 %t)
38 call void @side_effect(i32 0)
48 ; CHECK: call void @side_effect
50 ; CHECK: call void @side_effect
[all …]
/external/python/cpython3/Lib/test/
Dtest_code_module.py33 self.infunc.side_effect = EOFError('Finished')
38 self.infunc.side_effect = EOFError('Finished')
43 self.infunc.side_effect = ["'antioch'", "", EOFError('Finished')]
52 self.infunc.side_effect = ["undefined", EOFError('Finished')]
61 self.infunc.side_effect = ["raise ValueError('')",
70 self.infunc.side_effect = EOFError('Finished')
78 self.infunc.side_effect = EOFError('Finished')
84 self.infunc.side_effect = EOFError('Finished')
93 self.infunc.side_effect = EOFError('Finished')
102 self.infunc.side_effect = EOFError('Finished')
[all …]
Dtest_finalization.py78 self.side_effect()
82 def side_effect(self): member in NonGCSimpleBase
103 def side_effect(self): member in NonGCResurrector
227 def side_effect(self): member in SuicidalSelfCycle
324 def side_effect(self): member in SuicidalChained
430 self.side_effect()
441 def side_effect(self): member in LegacyResurrector
Dtest_script_helper.py42 mock_popen.side_effect = RuntimeError('bail out of unittest')
61 mock_popen.side_effect = RuntimeError('bail out of unittest')
86 mock_check_call.side_effect = subprocess.CalledProcessError('', '')
/external/llvm/test/Analysis/ScalarEvolution/
Dlatch-dominating-conditions.ll3 declare void @side_effect(i1)
16 ; CHECK: call void @side_effect(i1 true)
17 call void @side_effect(i1 %folds.to.true)
22 ; CHECK: call void @side_effect(i1 true)
23 call void @side_effect(i1 %folds.to.true)
42 ; CHECK: call void @side_effect(i1 %does.not.fold.to.true)
43 call void @side_effect(i1 %does.not.fold.to.true)
48 ; CHECK: call void @side_effect(i1 %does.not.fold.to.true)
49 call void @side_effect(i1 %does.not.fold.to.true)
/external/python/cpython3/Lib/unittest/test/testmock/
Dtestmock.py137 mock.side_effect = effect
144 mock.side_effect = effect
149 mock = Mock(side_effect=sentinel.SideEffect)
150 self.assertEqual(mock.side_effect, sentinel.SideEffect,
153 def side_effect(): function
155 mock = Mock(side_effect=side_effect, return_value=sentinel.RETURN)
167 mock.side_effect = [1, 2, 3]
173 mock.side_effect = effect
183 mock.side_effect = ValueError('Bazinga!')
190 mock = Mock(side_effect=java.lang.RuntimeException("Boom!"))
[all …]
/external/python/cpython3/Lib/test/test_asyncio/
Dtest_selector_events.py164 self.loop._ssock.recv.side_effect = BlockingIOError
168 self.loop._ssock.recv.side_effect = OSError
172 self.loop._csock.send.side_effect = BlockingIOError
178 self.loop._csock.send.side_effect = RuntimeError()
213 sock.recv.side_effect = BlockingIOError
224 err = sock.recv.side_effect = OSError()
273 sock.send.side_effect = BlockingIOError
285 sock.send.side_effect = InterruptedError
297 err = sock.send.side_effect = OSError()
349 sock.connect.side_effect = BlockingIOError
[all …]
/external/chromium-trace/catapult/dependency_manager/dependency_manager/
Dcloud_storage_info_unittest.py136 cs_get_mock.side_effect = _GetIfHashChangedMock
147 cs_get_mock.side_effect = [True]
160 cs_get_mock.side_effect = _GetIfHashChangedMock
171 unzip_mock.side_effect = _UnzipFileMock
215 cs_get_mock.side_effect = cloud_storage.CloudStorageError
219 cs_get_mock.side_effect = cloud_storage.ServerError
223 cs_get_mock.side_effect = cloud_storage.NotFoundError
227 cs_get_mock.side_effect = cloud_storage.PermissionError
231 cs_get_mock.side_effect = cloud_storage.CredentialsError
/external/autotest/site_utils/
Dautomated_deploy_unittest.py52 run_cmd.side_effect = [self.GIT_LOG_FOR_COMMITS, None, self.PUSH_LOG]
67 run_cmd.side_effect = [self.GIT_LOG_FOR_COMMITS, None, self.PUSH_LOG]
84 run_cmd.side_effect = [self.GIT_LOG_FOR_COMMITS, None, self.PUSH_LOG]
95 run_cmd.side_effect = [self.GIT_LOG_FOR_COMMITS, None,
/external/compiler-rt/test/asan/TestCases/
Dspeculative_load.cc40 inline void side_effect(const void *arg) { in side_effect() function
46 side_effect(&s); // optimizer is too smart otherwise in main()
48 side_effect(ptr); // force use ptr in main()
/external/llvm/test/Transforms/IndVarSimplify/
Deliminate-comparison.ll213 declare void @side_effect()
226 call void @side_effect()
233 call void @side_effect()
254 call void @side_effect()
261 call void @side_effect()
280 call void @side_effect()
287 call void @side_effect()
308 call void @side_effect()
316 call void @side_effect()
338 call void @side_effect()
[all …]
/external/tensorflow/tensorflow/python/debug/cli/
Devaluator_test.py154 dump, "get_tensors", side_effect=fake_get_tensors, autospec=True):
171 dump, "get_tensors", side_effect=fake_get_tensors, autospec=True):
185 dump, "get_tensors", side_effect=fake_get_tensors, autospec=True):
207 dump, "get_tensors", side_effect=fake_get_tensors, autospec=True):
227 dump, "get_tensors", side_effect=fake_get_tensors, autospec=True):
241 dump, "get_tensors", side_effect=fake_get_tensors, autospec=True):
/external/chromium-trace/catapult/devil/devil/
Ddevil_env_test.py31 mock.Mock(side_effect=lambda _env_var: None)):
37 mock.Mock(side_effect=lambda _env_var: None)):
46 mock.Mock(side_effect=mock_environment)):
/external/libmojo/third_party/catapult/devil/devil/
Ddevil_env_test.py31 mock.Mock(side_effect=lambda _env_var: None)):
37 mock.Mock(side_effect=lambda _env_var: None)):
46 mock.Mock(side_effect=mock_environment)):
/external/python/cpython3/Lib/distutils/tests/
Dtest_file_util.py65 with patch("os.rename", side_effect=OSError("wrong", 1)), \
73 with patch("os.rename", side_effect=OSError(errno.EXDEV, "wrong")), \
74 patch("os.unlink", side_effect=OSError("wrong", 1)), \
99 with patch("os.link", side_effect=OSError(0, "linking unsupported")):
/external/tensorflow/tensorflow/contrib/learn/python/learn/datasets/
Dbase_test.py34 mock_urllib.request.urlretrieve.side_effect = [
49 mock_urllib.request.urlretrieve.side_effect = [
70 mock_urllib.request.urlretrieve.side_effect = [
/external/python/cpython3/Doc/library/
Dunittest.mock.rst56 :attr:`side_effect` allows you to perform side effects, including raising an
59 >>> mock = Mock(side_effect=KeyError('foo'))
66 >>> def side_effect(arg):
69 >>> mock.side_effect = side_effect
72 >>> mock.side_effect = [5, 4, 3, 2, 1]
204 .. class:: Mock(spec=None, side_effect=None, return_value=DEFAULT, wraps=None, name=None, spec_set=…
223 * *side_effect*: A function to be called whenever the Mock is called. See
224 the :attr:`~Mock.side_effect` attribute. Useful for raising exceptions or
229 Alternatively *side_effect* can be an exception class or instance. In
232 If *side_effect* is an iterable then each call to the mock will return
[all …]
Dunittest.mock-examples.rst212 A useful attribute is :attr:`~Mock.side_effect`. If you set this to an
216 >>> mock = Mock(side_effect=Exception('Boom!'))
226 ``side_effect`` can also be set to a function or an iterable. The use case for
227 ``side_effect`` as an iterable is where your mock is going to be called several
229 ``side_effect`` to an iterable every call to the mock returns the next value
232 >>> mock = MagicMock(side_effect=[4, 5, 6])
242 depending on what the mock is called with, ``side_effect`` can be a function.
247 >>> def side_effect(*args):
250 >>> mock = MagicMock(side_effect=side_effect)
525 mock out the ``date`` class in the module under test. The :attr:`side_effect`
[all …]
/external/autotest/scheduler/shard/
Dshard_client_unittest.py59 side_effect=None, return_hosts=[], return_jobs=[], argument
68 if side_effect:
69 call = call.WithSideEffects(side_effect)
191 known_job_ids=[], side_effect=verify_upload_jobs_and_hqes)
362 self.expect_heartbeat(side_effect=shutdown_sut)
/external/chromium-trace/catapult/common/py_utils/py_utils/
Dcloud_storage_unittest.py251 mock_get_locked.side_effect = _FakeGetLocked
263 mock_calculate_hash.side_effect = _FakeCalulateHashNewHash
272 mock_get_locked.side_effect = _FakeGetLocked
295 mock_calculate_hash.side_effect = _FakeCalulateHashNewHash
304 mock_get_locked.side_effect = _FakeGetLocked
328 mock_get_locked.side_effect = _FakeGetLockedNewHash
/external/toolchain-utils/binary_search_tool/
Dbisect_driver.py277 for side_effect in get_side_effects(execargs):
278 cache_file(execargs, bisect_dir, population_name, side_effect)
316 for side_effect in get_side_effects(execargs):
317 restore_file(bisect_dir, cache, side_effect)
/external/scapy/test/
Dmock_windows.uts147 mock_dev_from_index.side_effect = dev_from_index_custom
149 mock_utils6cset.side_effect = lambda x,y,z: ["::1"] if x=="::" else ["fdbb:d995:ddd8:51fc::"]
182 mock_exec_query.side_effect = lambda *args, **kargs: exc_query_output.split("\n")
184 mock_dev_from_index.side_effect = dev_from_index_custom
185 mock_get_metrics.side_effect = lambda: {'16': 0, '13': 123}
264 mock_exec_query.side_effect = lambda *args, **kargs: exc_query_output.split("\n")
383 mocked_getiflist.side_effect = lambda: []
/external/clang/test/SemaCXX/
Dwarn-unused-private-field.cpp86 int side_effect() { in side_effect() function
94 initialized_with_side_effect_(side_effect()) { in A()
109 int in_class_initializer_with_side_effect_ = side_effect();
Dms-const-member-expr.cpp15 S *side_effect(); // expected-note{{declared here}}
17 side_effect()->E; // expected-note{{cannot be used in a constant expression}}
/external/chromium-trace/catapult/devil/devil/utils/
Dcmd_helper_test.py175 mock_read = mock.MagicMock(side_effect=read_side_effect)
176 mock_select = mock.MagicMock(side_effect=select_side_effect)
177 mock_time = mock.MagicMock(side_effect=time_side_effect)
178 self.mock_proc.poll = mock.MagicMock(side_effect=poll_side_effect)

12345