Add a bunch more legacy API tests

This commit is contained in:
Ian Cordasco 2016-07-19 11:12:51 -05:00
parent 8b4f12872e
commit 21a6df725b
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A
2 changed files with 98 additions and 2 deletions

View file

@ -115,8 +115,9 @@ class StyleGuide(object):
def init_report(self, reporter=None):
"""Set up a formatter for this run of Flake8."""
if (reporter is not None and
not issubclass(reporter, formatter.BaseFormatter)):
if reporter is None:
return
if not issubclass(reporter, formatter.BaseFormatter):
raise ValueError("Report should be subclass of "
"flake8.formatter.BaseFormatter.")
self._application.make_formatter(reporter)