• Home
  • Raw
  • Download

Lines Matching refs:self

52   def setUp(self):  argument
53 self.testable_mock = Mock(spec=Dex2OatWrapperTestable)
54 self.testable_mock.GetAllMethods.return_value = self._METHODS
55 self.testable_mock.GetAllPassesForMethod.return_value = self._PASSES
57 def MethodFailsForAllPasses(self, compiled_methods, run_passes=None): argument
58 return self._FAILING_METHOD not in compiled_methods
60 def MethodFailsForAPass(self, compiled_methods, run_passes=None): argument
61 return (self._FAILING_METHOD not in compiled_methods or
62 (run_passes is not None and self._FAILING_PASS not in run_passes))
64 def testNeverFails(self): argument
65 self.testable_mock.Test.return_value = True
66 res = BugSearch(self.testable_mock)
67 self.assertEqual(res, (None, None))
69 def testAlwaysFails(self): argument
70 self.testable_mock.Test.return_value = False
71 with self.assertRaises(FatalError):
72 BugSearch(self.testable_mock)
74 def testAMethodFailsForAllPasses(self): argument
75 self.testable_mock.Test.side_effect = self.MethodFailsForAllPasses
76 res = BugSearch(self.testable_mock)
77 self.assertEqual(res, (self._FAILING_METHOD, None))
79 def testAMethodFailsForAPass(self): argument
80 self.testable_mock.Test.side_effect = self.MethodFailsForAPass
81 res = BugSearch(self.testable_mock)
82 self.assertEqual(res, (self._FAILING_METHOD, self._FAILING_PASS))
84 def testMandatoryPassPresent(self): argument
85 self.testable_mock.GetAllPassesForMethod.return_value += (
86 [self._MANDATORY_PASS])
87 self.testable_mock.Test.side_effect = self.MethodFailsForAPass
88 BugSearch(self.testable_mock)
89 for (ordered_args, keyword_args) in self.testable_mock.Test.call_args_list:
96 self.assertIn(self._MANDATORY_PASS, passes)