Catch SystemExit for parse args
If you have a test with parse args it fails with no error messages. This change throws an exception. Change-Id: I545aba346620a352fe570d394dbd4d6bd2daa995
This commit is contained in:
parent
b3736fd9df
commit
79488377eb
@ -73,7 +73,10 @@ class TestCommand(TestCase):
|
||||
|
||||
def check_parser(self, cmd, args, verify_args):
|
||||
cmd_parser = cmd.get_parser('check_parser')
|
||||
parsed_args = cmd_parser.parse_args(args)
|
||||
try:
|
||||
parsed_args = cmd_parser.parse_args(args)
|
||||
except SystemExit:
|
||||
raise Exception("Argument parse failed")
|
||||
for av in verify_args:
|
||||
attr, value = av
|
||||
if attr:
|
||||
|
Loading…
x
Reference in New Issue
Block a user