mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-13 16:14:18 +00:00
rework plugin loading
This commit is contained in:
parent
38c5eceda9
commit
50d69150c1
36 changed files with 1277 additions and 1505 deletions
17
tests/unit/test_main_options.py
Normal file
17
tests/unit/test_main_options.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from flake8.main import options
|
||||
|
||||
|
||||
def test_stage1_arg_parser():
|
||||
stage1_parser = options.stage1_arg_parser()
|
||||
opts, args = stage1_parser.parse_known_args(
|
||||
["--foo", "--verbose", "src", "setup.py", "--statistics", "--version"]
|
||||
)
|
||||
|
||||
assert opts.verbose
|
||||
assert args == ["--foo", "src", "setup.py", "--statistics", "--version"]
|
||||
|
||||
|
||||
def test_stage1_arg_parser_ignores_help():
|
||||
stage1_parser = options.stage1_arg_parser()
|
||||
_, args = stage1_parser.parse_known_args(["--help", "-h"])
|
||||
assert args == ["--help", "-h"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue