Lines Matching full:mock
10 import mock
264 with mock.patch('mmap.mmap', mock.Mock(side_effect=assert_mmap)), \
265 mock.patch('builtins.open', mock.mock_open(read_data='dummy data')), \
266 mock.patch('os.name', os_name), \
267 mock.patch('contextlib.closing', raise_exception):
386 mock.Mock(
387 start=mock.Mock(return_value=0),
388 end=mock.Mock(return_value=0)
397 mock.Mock(
398 start=mock.Mock(return_value=0),
399 end=mock.Mock(return_value=26)
408 mock.Mock(
409 start=mock.Mock(return_value=0),
410 end=mock.Mock(return_value=0)
515 with mock.patch('os.path.isdir', return_value=isdir), \
516 mock.patch('os.getcwd', return_value=cur_dir), \
517 mock.patch('glob.glob', mock_glob), \
518 mock.patch('os.chdir', side_effect=mock_chdir) as chdir_mock:
524 chdir_mock.call_args == mock.call(old_dir)
650 result = mock.Mock()
658 with mock.patch('twisterlib.testsuite._find_src_dir_path', mock_fsdp), \
659 mock.patch('twisterlib.testsuite.find_c_files_in', mock_find), \
660 mock.patch('twisterlib.testsuite.scan_file', mock_sf), \
661 mock.patch('os.stat', mock_stat), \
701 with mock.patch('os.path.isdir', mock_isdir):