Lines Matching refs:mock
10 from unittest import mock
87 self.print_mock = mock.patch('kunit_printer.Printer.print').start()
88 self.addCleanup(mock.patch.stopall)
224 print_mock = mock.patch('kunit_printer.Printer.print').start()
432 mock.patch.object(signal, 'signal').start()
433 self.addCleanup(mock.patch.stopall)
496 mock.patch.object(tree._ops, 'start', side_effect=fake_start).start()
518 with mock.patch.object(tree._ops, 'start', side_effect=fake_start), \
519 mock.patch.object(kunit_kernel.subprocess, 'call'):
542 mock_build_config = mock.patch.object(tree, 'build_config').start()
563 mock_build_config = mock.patch.object(tree, 'build_config').start()
583 mock_build_config = mock.patch.object(tree, 'build_config').start()
594 self.print_mock = mock.patch('kunit_printer.Printer.print').start()
595 self.addCleanup(mock.patch.stopall)
643 self.print_mock = mock.patch('kunit_printer.Printer.print').start()
644 mock.patch.dict(os.environ, clear=True).start()
645 self.addCleanup(mock.patch.stopall)
647 self.mock_linux_init = mock.patch.object(kunit_kernel, 'LinuxSourceTree').start()
681 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
687 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
696 self.linux_source_mock.run_kernel = mock.Mock(return_value=['TAP version 14', '1..0'])
705 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
709 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
710 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run!')))
713 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
718 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
719 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run!')))
722 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
727 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
728 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run')))
731 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
739 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
767 @mock.patch.dict(os.environ, {'KBUILD_OUTPUT': '/tmp'})
776 @mock.patch.dict(os.environ, {'KBUILD_OUTPUT': '/tmp'})
837 @mock.patch.object(kunit_kernel, 'LinuxSourceTree')
890 @mock.patch.object(kunit, '_list_tests')
896 mock_tests.assert_called_once_with(mock.ANY,
899 …mock.call(args=None, build_dir='.kunit', filter_glob='suite.test*', filter='', filter_action=None,…
900 …mock.call(args=None, build_dir='.kunit', filter_glob='suite2.test*', filter='', filter_action=None…
903 @mock.patch.object(kunit, '_list_tests')
909 mock_tests.assert_called_once_with(mock.ANY,
912 …mock.call(args=None, build_dir='.kunit', filter_glob='suite.test1', filter='', filter_action=None,…
913 …mock.call(args=None, build_dir='.kunit', filter_glob='suite.test2', filter='', filter_action=None,…
914 …mock.call(args=None, build_dir='.kunit', filter_glob='suite2.test1', filter='', filter_action=None…
917 @mock.patch.object(sys, 'stdout', new_callable=io.StringIO)
925 @mock.patch.object(sys, 'stdout', new_callable=io.StringIO)