def test_html_reporter_missing_files(self): output = cStringIO.StringIO() self.linter.set_reporter(html.HTMLReporter(output)) self.linter.set_option('output-format', 'html') self.linter.check('troppoptop.py') value = output.getvalue() self.assertIn('troppoptop.py', value) self.assertIn('fatal', value)
def test_html_reporter_missing_files(self): output = six.StringIO() with catch_warnings(): self.linter.set_reporter(html.HTMLReporter(output)) self.linter.set_option('output-format', 'html') self.linter.check('troppoptop.py') self.linter.generate_reports() value = output.getvalue() self.assertIn('troppoptop.py', value) self.assertIn('fatal', value)