mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-11 23:34:17 +00:00
extend black formatting to tests as well
This commit is contained in:
parent
a7174759e9
commit
af1668bf04
45 changed files with 1644 additions and 1307 deletions
|
|
@ -7,15 +7,15 @@ from flake8.formatting import default
|
|||
|
||||
def options(**kwargs):
|
||||
"""Create an argparse.Namespace instance."""
|
||||
kwargs.setdefault('output_file', None)
|
||||
kwargs.setdefault('tee', False)
|
||||
kwargs.setdefault("output_file", None)
|
||||
kwargs.setdefault("tee", False)
|
||||
return argparse.Namespace(**kwargs)
|
||||
|
||||
|
||||
def test_format_returns_nothing():
|
||||
"""Verify Nothing.format returns None."""
|
||||
formatter = default.Nothing(options())
|
||||
error = style_guide.Violation('code', 'file.py', 1, 1, 'text', '1')
|
||||
error = style_guide.Violation("code", "file.py", 1, 1, "text", "1")
|
||||
|
||||
assert formatter.format(error) is None
|
||||
|
||||
|
|
@ -23,6 +23,6 @@ def test_format_returns_nothing():
|
|||
def test_show_source_returns_nothing():
|
||||
"""Verify Nothing.show_source returns None."""
|
||||
formatter = default.Nothing(options())
|
||||
error = style_guide.Violation('code', 'file.py', 1, 1, 'text', '1')
|
||||
error = style_guide.Violation("code", "file.py", 1, 1, "text", "1")
|
||||
|
||||
assert formatter.show_source(error) is None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue