summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorTerry Howe <terrylhowe@gmail.com>2014-07-06 10:02:51 -0600
committerTerry Howe <terrylhowe@gmail.com>2014-07-06 10:02:51 -0600
commit79488377eb868460dff841d732ac003625505345 (patch)
tree4e62862094be3c4ceca769a0f9050d72a112874e /openstackclient
parentb3736fd9df869e2f2824ed831deb3aa9a446ee59 (diff)
downloadpython-openstackclient-79488377eb868460dff841d732ac003625505345.tar.gz
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
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/tests/utils.py5
1 files changed, 4 insertions, 1 deletions
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: