Lines Matching refs:mock
10 from unittest import mock
211 print_mock = mock.patch('builtins.print').start()
322 mock.patch.object(signal, 'signal').start()
323 self.addCleanup(mock.patch.stopall)
349 mock.patch.object(tree._ops, 'start', side_effect=fake_start).start()
406 self.print_mock = mock.patch('builtins.print').start()
407 self.addCleanup(mock.patch.stopall)
409 self.linux_source_mock = mock.Mock()
410 self.linux_source_mock.build_reconfig = mock.Mock(return_value=True)
411 self.linux_source_mock.build_kernel = mock.Mock(return_value=True)
412 self.linux_source_mock.run_kernel = mock.Mock(return_value=all_passed_log)
442 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
448 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
457 self.linux_source_mock.run_kernel = mock.Mock(return_value=['TAP version 14', '1..0'])
465 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
469 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
470 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run!')))
473 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
478 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
479 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run!')))
482 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
487 self.assertNotEqual(call, mock.call(StrContains('Testing complete.')))
488 self.assertNotEqual(call, mock.call(StrContains(' 0 tests run')))
493 self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
538 @mock.patch.object(kunit_kernel, 'LinuxSourceTree')
549 @mock.patch.object(kunit_kernel, 'LinuxSourceTree')
580 @mock.patch.object(kunit, '_list_tests')
586 mock_tests.assert_called_once_with(mock.ANY,
589 mock.call(args=None, build_dir='.kunit', filter_glob='suite.test*', timeout=300),
590 mock.call(args=None, build_dir='.kunit', filter_glob='suite2.test*', timeout=300),
593 @mock.patch.object(kunit, '_list_tests')
599 mock_tests.assert_called_once_with(mock.ANY,
602 mock.call(args=None, build_dir='.kunit', filter_glob='suite.test1', timeout=300),
603 mock.call(args=None, build_dir='.kunit', filter_glob='suite.test2', timeout=300),
604 mock.call(args=None, build_dir='.kunit', filter_glob='suite2.test1', timeout=300),