Lines Matching refs:mock
11 import mock
406 testplan = TestPlan(env=mock.Mock())
407 lvl1 = mock.Mock()
409 lvl2 = mock.Mock()
411 lvl3 = mock.Mock()
425 lvl_missed = mock.Mock()
466 testplan = TestPlan(env=mock.Mock())
499 testplan = TestPlan(env=mock.Mock())
500 testplan.options = mock.Mock(sub_test=sub_tests)
503 'ts1': mock.Mock(
505 mock.Mock(),
506 mock.Mock(),
509 'ts2': mock.Mock(
511 mock.Mock(),
512 mock.Mock(),
513 mock.Mock(),
565 testplan = TestPlan(env=mock.Mock())
566 testplan.options = mock.Mock(
572 'ts1': mock.Mock(id=1),
573 'ts2': mock.Mock(id=2),
577 testplan.add_testsuites = mock.Mock(return_value=added_testsuite_count)
578 testplan.find_subtests = mock.Mock()
579 testplan.report_duplicates = mock.Mock()
580 testplan.parse_configuration = mock.Mock()
581 testplan.add_configurations = mock.Mock()
705 testplan = TestPlan(env=mock.Mock(outdir=tmp_path))
707 'ts1': mock.Mock(testcases=[], extra_configs=[]),
708 'ts2': mock.Mock(testcases=[], extra_configs=[]),
712 testplan.options = mock.Mock(
727 testplan.platforms=[mock.Mock(), mock.Mock(), mock.Mock(), mock.Mock(),
728 mock.Mock(), mock.Mock(), mock.Mock(), mock.Mock(),
729 mock.Mock(), mock.Mock(), mock.Mock(), mock.Mock()]
766 testplan.generate_subset = mock.Mock()
767 testplan.apply_filters = mock.Mock()
769 with mock.patch('twisterlib.testinstance.TestInstance.create_overlay', mock.Mock()), \
770 mock.patch('twisterlib.testinstance.TestInstance.check_runnable', return_value=True), \
818 testplan = TestPlan(env=mock.Mock())
819 testplan.options = mock.Mock(
825 'plat1/testA': mock.Mock(status=TwisterStatus.NONE),
826 'plat1/testB': mock.Mock(status=TwisterStatus.NONE),
827 'plat1/testC': mock.Mock(status=TwisterStatus.NONE),
828 'plat2/testA': mock.Mock(status=TwisterStatus.NONE),
829 'plat2/testB': mock.Mock(status=TwisterStatus.NONE),
830 'plat3/testA': mock.Mock(status=TwisterStatus.SKIP),
831 'plat3/testB': mock.Mock(status=TwisterStatus.SKIP),
832 'plat3/testC': mock.Mock(status=TwisterStatus.ERROR),
842 testplan = TestPlan(env=mock.Mock())
844 modules = [mock.Mock(meta={'name': 'name1'}),
845 mock.Mock(meta={'name': 'name2'})]
847 with mock.patch('twisterlib.testplan.parse_modules', return_value=modules):
878 testplan = TestPlan(env=mock.Mock())
879 testplan.report_test_tree = mock.Mock()
880 testplan.report_test_list = mock.Mock()
881 testplan.report_tag_list = mock.Mock()
883 testplan.options = mock.Mock(
904 mock.Mock(
908 mock.Mock(
922 mock.Mock(
926 mock.Mock(
953 testplan = TestPlan(env=mock.Mock())
956 testplan.get_testsuite = mock.Mock(side_effect=mock_get)
969 testplan = TestPlan(env=mock.Mock())
971 'testsuite0': mock.Mock(tags=set(['tag1', 'tag2'])),
972 'testsuite1': mock.Mock(tags=set(['tag1', 'tag2', 'tag3'])),
973 'testsuite2': mock.Mock(tags=set(['tag1', 'tag3'])),
974 'testsuite3': mock.Mock(tags=set(['tag']))
990 testplan = TestPlan(env=mock.Mock())
991 testplan.get_tests_list = mock.Mock(
1048 testplan = TestPlan(env=mock.Mock())
1049 testplan.get_tests_list = mock.Mock(
1262 env = mock.Mock(board_roots=[tmp_board_root_dir],soc_roots=[tmp_path], arch_roots=[tmp_path])
1288 testplan = TestPlan(env=mock.Mock())
1289 tc1 = mock.Mock()
1291 tc2 = mock.Mock()
1293 tc3 = mock.Mock()
1295 tc4 = mock.Mock()
1297 tc5 = mock.Mock()
1299 ts1 = mock.Mock(testcases=[tc1, tc2])
1300 ts2 = mock.Mock(testcases=[tc3, tc4, tc5])
1440 env = mock.Mock(
1442 options=mock.Mock(detailed_test_id=detailed_id),
1455 testplan = TestPlan(env=mock.Mock())
1474 testplan = TestPlan(env=mock.Mock())
1475 p1 = mock.Mock()
1478 p2 = mock.Mock()
1503 p = mock.Mock()
1508 ts1tc1 = mock.Mock()
1510 ts1 = mock.Mock(testcases=[ts1tc1])
1512 ts2 = mock.Mock(testcases=[])
1514 ts3tc1 = mock.Mock()
1516 ts3tc2 = mock.Mock()
1518 ts3 = mock.Mock(testcases=[ts3tc1, ts3tc2])
1520 ts4tc1 = mock.Mock()
1522 ts4 = mock.Mock(testcases=[ts4tc1])
1524 ts5 = mock.Mock(testcases=[])
1527 testplan = TestPlan(env=mock.Mock(outdir=os.path.join('out', 'dir')))
1528 testplan.options = mock.Mock(device_testing=device_testing, test_only=True, report_summary=None)
1537 testplan.get_platform = mock.Mock(side_effect=get_platform)
1624 check_runnable_mock = mock.Mock(return_value=True)
1626 with mock.patch('builtins.open', mock.mock_open(read_data=testplan_data)), \
1627 mock.patch('twisterlib.testinstance.TestInstance.check_runnable', check_runnable_mock), \
1628 mock.patch('twisterlib.testinstance.TestInstance.create_overlay', mock.Mock()):
1714 check_runnable_mock.assert_called_with(mock.ANY, mock.ANY)
1726 testplan = TestPlan(env=mock.Mock())
1727 instance1 = mock.Mock()
1729 instance2 = mock.Mock()
1742 testplan = TestPlan(env=mock.Mock())
1744 'test1.suite0': mock.Mock(testcases=[mock.Mock(), mock.Mock()]),
1745 'test1.suite1': mock.Mock(testcases=[mock.Mock(), mock.Mock()]),
1746 'test1.suite2': mock.Mock(testcases=[mock.Mock(), mock.Mock()]),
1747 'test1.suite3': mock.Mock(testcases=[])
1769 testplan = TestPlan(env=mock.Mock())
1801 'inst0': mock.Mock(status=TwisterStatus.PASS),
1802 'inst1': mock.Mock(status=TwisterStatus.SKIP),
1803 'inst2': mock.Mock(status=TwisterStatus.ERROR),
1807 testplan = TestPlan(env=mock.Mock(outdir=outdir))
1808 testplan._create_build_dir_link = mock.Mock(side_effect=mock_link)
1811 with mock.patch('os.path.exists', return_value=exists), \
1812 mock.patch('os.mkdir', mock.Mock()) as mkdir_mock:
1848 with mock.patch('os.name', os_name), \
1849 mock.patch('os.symlink', side_effect=mock_symlink), \
1850 mock.patch('os.makedirs', side_effect=mock_makedirs), \
1851 mock.patch('subprocess.call', side_effect=mock_call), \
1852 mock.patch('os.path.join', side_effect=mock_join):
1854 testplan = TestPlan(env=mock.Mock())
1857 instance = mock.Mock(build_dir=instance_build_dir)
1898 options = mock.Mock()
1899 platform = mock.Mock()
1901 testsuite = mock.Mock(integration_platforms=['good platform', 'a platform'])
1902 instance = mock.Mock(