🐛 fix argument parser message (#1426)

This commit is contained in:
Ju4tCode
2022-11-29 12:00:09 +08:00
committed by GitHub
parent 6c27ec7357
commit e8ffa63b78
2 changed files with 12 additions and 3 deletions

View File

@ -296,6 +296,7 @@ async def test_shell_command(app: App):
assert state[SHELL_ARGV] == []
assert isinstance(state[SHELL_ARGS], ParserExit)
assert state[SHELL_ARGS].status != 0
assert state[SHELL_ARGS].message.startswith(parser.format_usage() + "test: error:")
test_message_parser = shell_command(CMD, parser=parser)
dependent = list(test_message_parser.checkers)[0]