def assert_carriage_return(self, input_lines, expected_lines, error_lines): """Process the given line and assert that the result is correct.""" handle_style_error = self._mock_style_error_handler checker = CarriageReturnChecker(handle_style_error) output_lines = checker.check(input_lines) # Check both the return value and error messages. self.assertEquals(output_lines, expected_lines) expected_errors = [(line_number, self._category, self._confidence, self._expected_message) for line_number in error_lines] self.assertEquals(self._style_errors, expected_errors)