Lines Matching refs:mock

10 import mock
78 proc_mock = mock.Mock()
79 popen_mock = mock.Mock(return_value=proc_mock)
82 with mock.patch('subprocess.Popen', popen_mock), \
83 mock.patch('os.environ', env_mock):
104 inherit_read_fd = mock.Mock()
105 inherit_write_fd = mock.Mock()
109 internal_read_fd = mock.Mock()
110 internal_write_fd = mock.Mock()
115 close_mock = mock.Mock()
116 write_mock = mock.Mock()
117 set_blocking_mock = mock.Mock()
118 selector_mock = mock.Mock()
121 jobs = mock.Mock()
122 makeflags = mock.Mock()
145 with mock.patch('os.close', close_mock), \
146 mock.patch('os.write', write_mock), \
147 mock.patch('os.set_blocking', set_blocking_mock), \
148 mock.patch('os.pipe', mock_pipe), \
149 mock.patch('selectors.DefaultSelector', selector_mock):
253 gmjc_init_mock = mock.Mock(return_value=None)
255 with mock.patch('fcntl.fcntl', mock_fcntl), \
256 mock.patch('os.close', mock.Mock()), \
257 mock.patch('twisterlib.jobserver.GNUMakeJobClient.__init__',
285 inherit_read_fd = mock.Mock()
286 inherit_write_fd = mock.Mock()
289 internal_read_fd = mock.Mock()
290 internal_write_fd = mock.Mock()
295 selected = [[mock.Mock(fd=0, data=1)], [mock.Mock(fd=1, data=0)]]
308 close_mock = mock.Mock()
309 write_mock = mock.Mock()
310 set_blocking_mock = mock.Mock()
311 selector_mock = mock.Mock()
312 selector_mock().select = mock.Mock(side_effect=mock_select)
315 jobs = mock.Mock()
322 with mock.patch('os.read', side_effect=mock_read):
331 with mock.patch('os.close', close_mock), \
332 mock.patch('os.write', write_mock), \
333 mock.patch('os.set_blocking', set_blocking_mock), \
334 mock.patch('os.pipe', mock_pipe), \
335 mock.patch('selectors.DefaultSelector', selector_mock):
342 ('dummy makeflags', mock.ANY, mock.ANY, {'MAKEFLAGS': 'dummy makeflags'}),
363 selector_mock = mock.Mock()
376 with mock.patch.object(GNUMakeJobClient, '__del__', mock.Mock()), \
377 mock.patch('selectors.DefaultSelector', selector_mock):
398 selector_mock = mock.Mock()
410 with mock.patch('twisterlib.jobserver.GNUMakeJobClient.__del__',
411 mock.Mock()), \
412 mock.patch('selectors.DefaultSelector', selector_mock):
439 selector_mock = mock.Mock()
440 write_mock = mock.Mock()
441 del_mock = mock.Mock()
446 with mock.patch.object(GNUMakeJobClient, '__del__', del_mock), \
447 mock.patch.object(GNUMakeJobClient, '__init__', mock_init), \
448 mock.patch('os.pipe', return_value=pipe), \
449 mock.patch('os.write', write_mock), \
450 mock.patch('multiprocessing.cpu_count', return_value=cpu_count), \
451 mock.patch('select.PIPE_BUF', pipe_buf), \
452 mock.patch('selectors.DefaultSelector', selector_mock):