Lines Matching refs:mock
10 from unittest import mock
84 self.print_mock = mock.patch('kunit_printer.Printer.print').start()
85 self.addCleanup(mock.patch.stopall)
210 print_mock = mock.patch('kunit_printer.Printer.print').start()
391 mock.patch.object(signal, 'signal').start()
392 self.addCleanup(mock.patch.stopall)
454 mock.patch.object(tree._ops, 'start', side_effect=fake_start).start()
474 mock_build_config = mock.patch.object(tree, 'build_config').start()
495 mock_build_config = mock.patch.object(tree, 'build_config').start()
515 mock_build_config = mock.patch.object(tree, 'build_config').start()
526 self.print_mock = mock.patch('kunit_printer.Printer.print').start()
527 self.addCleanup(mock.patch.stopall)
575 self.print_mock = mock.patch('kunit_printer.Printer.print').start()
576 self.addCleanup(mock.patch.stopall)
578 self.mock_linux_init = mock.patch.object(kunit_kernel, 'LinuxSourceTree').start()
612 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
618 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
627 self.linux_source_mock.run_kernel = mock.Mock(return_value=['TAP version 14', '1..0'])
636 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
640 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
641 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run!')))
644 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
649 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
650 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run!')))
653 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
658 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
659 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run')))
662 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
670 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
750 @mock.patch.object(kunit_kernel, 'LinuxSourceTree')
803 @mock.patch.object(kunit, '_list_tests')
809 mock_tests.assert_called_once_with(mock.ANY,
812 mock.call(args=None, build_dir='.kunit', filter_glob='suite.test*', filter='', filter_action=None, timeout=300),
813 mock.call(args=None, build_dir='.kunit', filter_glob='suite2.test*', filter='', filter_action=None, timeout=300),
816 @mock.patch.object(kunit, '_list_tests')
822 mock_tests.assert_called_once_with(mock.ANY,
825 mock.call(args=None, build_dir='.kunit', filter_glob='suite.test1', filter='', filter_action=None, timeout=300),
826 mock.call(args=None, build_dir='.kunit', filter_glob='suite.test2', filter='', filter_action=None, timeout=300),
827 mock.call(args=None, build_dir='.kunit', filter_glob='suite2.test1', filter='', filter_action=None, timeout=300),