Skip to content

Commit 7948837

Browse files
committed
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
1 parent b3736fd commit 7948837

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎openstackclient/tests/utils.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ def setUp(self):
7373

7474
def check_parser(self, cmd, args, verify_args):
7575
cmd_parser = cmd.get_parser('check_parser')
76-
parsed_args = cmd_parser.parse_args(args)
76+
try:
77+
parsed_args = cmd_parser.parse_args(args)
78+
except SystemExit:
79+
raise Exception("Argument parse failed")
7780
for av in verify_args:
7881
attr, value = av
7982
if attr:

0 commit comments

Comments
 (0)