mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 05:26:53 +00:00
Display list of available formatters with help for --format
This commit is contained in:
parent
fbb33430e6
commit
48b2919130
8 changed files with 35 additions and 4 deletions
|
|
@ -18,6 +18,7 @@ def optmanager():
|
|||
version="3.0.0",
|
||||
plugin_versions="",
|
||||
parents=[],
|
||||
formatter_names=[],
|
||||
)
|
||||
options.register_default_options(option_manager)
|
||||
return option_manager
|
||||
|
|
|
|||
|
|
@ -406,3 +406,13 @@ The specified config file does not exist: missing.cfg
|
|||
out, err = capsys.readouterr()
|
||||
assert out == expected
|
||||
assert err == ""
|
||||
|
||||
|
||||
def test_format_option_help(capsys):
|
||||
"""Test that help displays list of available formatters."""
|
||||
with pytest.raises(SystemExit):
|
||||
cli.main(["--help"])
|
||||
|
||||
out, err = capsys.readouterr()
|
||||
assert "(default, pylint, quiet-filename, quiet-nothing)" in out
|
||||
assert err == ""
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ def test_local_plugin_can_add_option(local_config):
|
|||
version="123",
|
||||
plugin_versions="",
|
||||
parents=[stage1_parser],
|
||||
formatter_names=[],
|
||||
)
|
||||
register_default_options(option_manager)
|
||||
option_manager.register_plugins(loaded_plugins)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue