mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-09 14:24:17 +00:00
Test default provided options are forwarded
Ensure options provided external to the command-line (i.e., configuration files) are present in the final result of options.
This commit is contained in:
parent
ec8fcfc8f8
commit
b231c10016
1 changed files with 7 additions and 0 deletions
|
|
@ -22,6 +22,13 @@ def test_option_manager_creates_option_parser(optmanager):
|
||||||
assert isinstance(optmanager.parser, argparse.ArgumentParser)
|
assert isinstance(optmanager.parser, argparse.ArgumentParser)
|
||||||
|
|
||||||
|
|
||||||
|
def test_parse_args_forwarding_default_values(optmanager):
|
||||||
|
"""Verify default provided values are present in the final result."""
|
||||||
|
namespace = argparse.Namespace(foo='bar')
|
||||||
|
options, args = optmanager.parse_args([], namespace)
|
||||||
|
assert options.foo == 'bar'
|
||||||
|
|
||||||
|
|
||||||
def test_add_option_short_option_only(optmanager):
|
def test_add_option_short_option_only(optmanager):
|
||||||
"""Verify the behaviour of adding a short-option only."""
|
"""Verify the behaviour of adding a short-option only."""
|
||||||
assert optmanager.options == []
|
assert optmanager.options == []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue