From 79488377eb868460dff841d732ac003625505345 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Sun, 6 Jul 2014 10:02:51 -0600 Subject: 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 --- openstackclient/tests/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'openstackclient') diff --git a/openstackclient/tests/utils.py b/openstackclient/tests/utils.py index 48385d13..307abd7b 100644 --- a/openstackclient/tests/utils.py +++ b/openstackclient/tests/utils.py @@ -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: -- cgit v1.2.1