'Tests the top-level linting with rule totals option.'

def test_lint_with_rule_totals(self):

    out = StringIO()
    summary_results = SummaryResults()
    _lint('scripts/tests/templates', template_linters=[MakoTemplateLinter(), UnderscoreTemplateLinter(), JavaScriptLinter(), PythonLinter()], options={'list_files': False, 'verbose': False, 'rule_totals': True}, summary_results=summary_results, out=out)
    output = out.getvalue()
    self.assertIsNotNone(re.search('test\\.py.*{}'.format(Rules.python_wrap_html.rule_id), output))
    self.assertIsNotNone(re.search('{}:\\s*{}    violations'.format(Rules.python_parse_error.rule_id, 0), output))
    self.assertIsNotNone(re.search('{}:\\s*{}    violations'.format(Rules.python_wrap_html.rule_id, 1), output))
    self.assertIsNotNone(re.search('{}    violations    total'.format(7), output))
