Lines Matching full:mock
14 import mock
72 env = mock.Mock(
73 options=mock.Mock(
85 with mock.patch('os.name', 'nt'):
90 # mock path to QEMU binary in QEMU_BIN_PATH environment variable
91 with mock.patch('os.environ', {'QEMU_BIN_PATH': ''}):
241 testinstance.testcases = [mock.Mock()]
245 with mock.patch(
247 mock.mock_open(read_data='')
249 mock.patch(
251 mock.Mock()
253 mock.patch(
255 mock.Mock()
266 mock_writeheader.assert_has_calls([mock.call({ k:k for k in recording[0]})])
267 mock_writerows.assert_has_calls([mock.call(recording)])
457 (True, mock.ANY, mock.ANY, mock.ANY, None, [], False),
458 (False, True, mock.ANY, mock.ANY, 'device', [], True),
459 (False, False, 'qemu', mock.ANY, 'qemu', ['QEMU_PIPE=1'], True),
460 (False, False, 'armfvp', mock.ANY, 'armfvp', [], True),
483 testinstance.handler = mock.Mock() if preexisting_handler else None
486 env = mock.Mock(
487 options=mock.Mock(
494 with mock.patch.object(QEMUHandler, 'get_fifo', return_value=1), \
495 mock.patch('shutil.which', return_value=True):
505 ('nt', 'renode', mock.ANY, mock.ANY,
506 mock.ANY, mock.ANY, mock.ANY,
507 mock.ANY, mock.ANY, mock.ANY, mock.ANY, False),
508 ('linux', mock.ANY, mock.ANY, mock.ANY,
509 True, mock.ANY, mock.ANY,
510 mock.ANY, mock.ANY, mock.ANY, mock.ANY, False),
511 ('linux', mock.ANY, mock.ANY, mock.ANY,
512 False, True, mock.ANY,
513 False, mock.ANY, mock.ANY, mock.ANY, False),
514 ('linux', 'qemu', mock.ANY, mock.ANY,
515 False, mock.ANY, 'pytest',
516 mock.ANY, 'not runnable', mock.ANY, None, True),
518 False, mock.ANY, 'console',
519 mock.ANY, 'not runnable', [], None, True),
521 False, mock.ANY, 'not pytest',
522 mock.ANY, 'not runnable', mock.ANY, None, False),
523 ('linux', 'qemu', mock.ANY, mock.ANY,
524 False, mock.ANY, 'console',
525 …mock.ANY, 'not runnable', ['?'], mock.Mock(duts=[mock.Mock(platform='demo_board_2', fixtures=[])])…
556 env = mock.Mock(
557 options=mock.Mock(
565 with mock.patch('os.name', os_name), \
566 mock.patch('shutil.which', return_value=exec_exists):
583 testinstance.get_elf_file = mock.Mock(return_value='dummy.elf')
584 testinstance.get_buildlog_file = mock.Mock(return_value='build.log')
586 sc_mock = mock.Mock()
587 mock_sc = mock.Mock(return_value=sc_mock)
589 with mock.patch('twisterlib.testinstance.SizeCalculator', mock_sc):
619 testinstance.domains = mock.Mock(
620 get_default_domain=mock.Mock(
621 return_value=mock.Mock(