'Tests the top-level linting with verbose option.'

def test_lint_with_verbose(self):

    out = StringIO()
    summary_results = SummaryResults()
    _lint('scripts/tests/templates', template_linters=[MakoTemplateLinter(), UnderscoreTemplateLinter(), JavaScriptLinter(), PythonLinter()], options={'list_files': False, 'verbose': True, 'rule_totals': False}, summary_results=summary_results, out=out)
    output = out.getvalue()
    lines_with_rule = 0
    lines_without_rule = 0
    for underscore_match in re.finditer('test\\.underscore:.*\n', output):
        if (re.search(Rules.underscore_not_escaped.rule_id, underscore_match.group()) is not None):
            lines_with_rule += 1
        else:
            lines_without_rule += 1
    self.assertGreaterEqual(lines_with_rule, 1)
    self.assertGreaterEqual(lines_without_rule, 1)
    self.assertIsNone(re.search('{}:\\s*{}    violations'.format(Rules.python_parse_error.rule_id, 0), output))
    self.assertIsNotNone(re.search('{}    violations    total'.format(7), output))
