Lines Matching refs:mock
10 from unittest import mock
213 print_mock = mock.patch('kunit_printer.Printer.print').start()
354 mock.patch.object(signal, 'signal').start()
355 self.addCleanup(mock.patch.stopall)
417 mock.patch.object(tree._ops, 'start', side_effect=fake_start).start()
437 mock_build_config = mock.patch.object(tree, 'build_config').start()
458 mock_build_config = mock.patch.object(tree, 'build_config').start()
478 mock_build_config = mock.patch.object(tree, 'build_config').start()
535 self.print_mock = mock.patch('kunit_printer.Printer.print').start()
536 self.addCleanup(mock.patch.stopall)
538 self.mock_linux_init = mock.patch.object(kunit_kernel, 'LinuxSourceTree').start()
572 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
578 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
587 self.linux_source_mock.run_kernel = mock.Mock(return_value=['TAP version 14', '1..0'])
596 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
600 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
601 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run!')))
604 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
609 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
610 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run!')))
613 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
618 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
619 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run')))
622 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
630 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
710 @mock.patch.object(kunit_kernel, 'LinuxSourceTree')
765 @mock.patch.object(kunit, '_list_tests')
771 mock_tests.assert_called_once_with(mock.ANY,
774 mock.call(args=None, build_dir='.kunit', filter_glob='suite.test*', timeout=300),
775 mock.call(args=None, build_dir='.kunit', filter_glob='suite2.test*', timeout=300),
778 @mock.patch.object(kunit, '_list_tests')
784 mock_tests.assert_called_once_with(mock.ANY,
787 mock.call(args=None, build_dir='.kunit', filter_glob='suite.test1', timeout=300),
788 mock.call(args=None, build_dir='.kunit', filter_glob='suite.test2', timeout=300),
789 mock.call(args=None, build_dir='.kunit', filter_glob='suite2.test1', timeout=300),