mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-17 15:59:55 +00:00
add help command
This commit is contained in:
@ -65,6 +65,27 @@ def test_subparsers_aur_search_architecture(parser: argparse.ArgumentParser) ->
|
||||
assert args.architecture == [""]
|
||||
|
||||
|
||||
def test_subparsers_help(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
help command must imply architecture list, lock, no-report, quiet, unsafe and parser
|
||||
"""
|
||||
args = parser.parse_args(["help"])
|
||||
assert args.architecture == [""]
|
||||
assert args.lock is None
|
||||
assert args.no_report
|
||||
assert args.quiet
|
||||
assert args.unsafe
|
||||
assert args.parser is not None and args.parser()
|
||||
|
||||
|
||||
def test_subparsers_help_architecture(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
help command must correctly parse architecture list
|
||||
"""
|
||||
args = parser.parse_args(["-a", "x86_64", "help"])
|
||||
assert args.architecture == [""]
|
||||
|
||||
|
||||
def test_subparsers_help_commands_unsafe(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
help-commands-unsafe command must imply architecture list, lock, no-report, quiet, unsafe and parser
|
||||
@ -80,7 +101,7 @@ def test_subparsers_help_commands_unsafe(parser: argparse.ArgumentParser) -> Non
|
||||
|
||||
def test_subparsers_help_commands_unsafe_architecture(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
help-ommands-unsafe command must correctly parse architecture list
|
||||
help-commands-unsafe command must correctly parse architecture list
|
||||
"""
|
||||
args = parser.parse_args(["-a", "x86_64", "help-commands-unsafe"])
|
||||
assert args.architecture == [""]
|
||||
|
Reference in New Issue
Block a user