def validate(self, lint_task_report, expected_messages, failed_count):
    'Assert linter output messages with expected messages.'
    for stdout in lint_task_report:
        if stdout.failed:
            for message in expected_messages:
                self.assert_same_list_elements([message], stdout.trimmed_messages)
            self.assert_failed_messages_count(stdout.get_report(), failed_count)
        else:
            continue
Assert linter output messages with expected messages.
def validate(self, lint_task_report, expected_messages, failed_count):
    
    for stdout in lint_task_report:
        if stdout.failed:
            for message in expected_messages:
                self.assert_same_list_elements([message], stdout.trimmed_messages)
            self.assert_failed_messages_count(stdout.get_report(), failed_count)
        else:
            continue