Lines Matching refs:mock
10 import mock
248 with mock.patch('mmap.mmap', mock.Mock(side_effect=assert_mmap)), \
249 mock.patch('builtins.open', mock.mock_open(read_data='dummy data')), \
250 mock.patch('os.name', os_name), \
251 mock.patch('contextlib.closing', raise_exception):
370 mock.Mock(
371 start=mock.Mock(return_value=0),
372 end=mock.Mock(return_value=0)
381 mock.Mock(
382 start=mock.Mock(return_value=0),
383 end=mock.Mock(return_value=26)
392 mock.Mock(
393 start=mock.Mock(return_value=0),
394 end=mock.Mock(return_value=0)
499 with mock.patch('os.path.isdir', return_value=isdir), \
500 mock.patch('os.getcwd', return_value=cur_dir), \
501 mock.patch('glob.glob', mock_glob), \
502 mock.patch('os.chdir', side_effect=mock_chdir) as chdir_mock:
508 chdir_mock.call_args == mock.call(old_dir)
634 result = mock.Mock()
639 with mock.patch('twisterlib.testsuite._find_src_dir_path', mock_fsdp), \
640 mock.patch('twisterlib.testsuite.find_c_files_in', mock_find), \
641 mock.patch('twisterlib.testsuite.scan_file', mock_sf), \
642 mock.patch('os.stat', mock_stat), \
682 with mock.patch('os.path.isdir', mock_isdir):