Lines Matching refs:self

22   def process(self, output, reduction=None):
23 has_unexpected_output = self.has_unexpected_output(output)
25 self.regenerate_expected_files(output)
26 return self._create_result(has_unexpected_output, output, reduction)
28 def regenerate_expected_files(self, output):
31 def has_unexpected_output(self, output):
32 return self.get_outcome(output) not in self.expected_outcomes
34 def _create_result(self, has_unexpected_output, output, reduction):
51 def get_outcome(self, output):
56 elif self._has_failed(output):
61 def _has_failed(self, output):
62 execution_failed = self._is_failure_output(output)
63 if self.negative:
67 def _is_failure_output(self, output):
71 def negative(self):
75 def expected_outcomes(self):
81 def negative(self):
87 def has_unexpected_output(self, output):
88 return self.get_outcome(output) != statusfile.PASS
91 def expected_outcomes(self):
104 def __init__(self, expected_outcomes):
105 self._expected_outcomes = expected_outcomes
108 def expected_outcomes(self):
109 return self._expected_outcomes
113 def __getstate__(self):
114 d = self.__dict__
115 if self._expected_outcomes is OUTCOMES_PASS:
120 def __setstate__(self, d):
123 self.__dict__.update(d)
135 def __init__(self, expected_outcomes, expected_filename,
137 super(ExpectedOutProc, self).__init__(expected_outcomes)
138 self._expected_filename = expected_filename
139 self._regenerate_expected_files = regenerate_expected_files
141 def _is_failure_output(self, output):
145 with open(self._expected_filename, 'r', encoding='utf-8') as f:
148 for act_iterator in self._act_block_iterator(output):
150 self._expected_iterator(expected_lines),
158 def regenerate_expected_files(self, output):
159 if not self._regenerate_expected_files:
162 with open(self._expected_filename, 'w') as f:
166 def _act_block_iterator(self, output):
178 yield self._actual_iterator(lines[start_index:index])
183 yield self._actual_iterator(lines)
185 def _actual_iterator(self, lines):
186 return self._iterator(lines, self._ignore_actual_line)
188 def _expected_iterator(self, lines):
189 return self._iterator(lines, self._ignore_expected_line)
191 def _ignore_actual_line(self, line):
208 def _ignore_expected_line(self, line):
211 def _iterator(self, lines, ignore_predicate):