summaryrefslogtreecommitdiffstats
path: root/ipatests/test_cmdline
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-07-10 16:22:41 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-10-03 19:50:35 +0200
commitef2d61faa2d76924fb20b0883da03b4e9f7087a4 (patch)
tree90efac9f578fe5d09ef75c36d6dbb3034928419c /ipatests/test_cmdline
parent5c06e27ff90e917393efdeb58f0f671022803d96 (diff)
downloadfreeipa-ef2d61faa2d76924fb20b0883da03b4e9f7087a4.tar.gz
freeipa-ef2d61faa2d76924fb20b0883da03b4e9f7087a4.tar.xz
freeipa-ef2d61faa2d76924fb20b0883da03b4e9f7087a4.zip
ipatests.test_cmdline.test_help: Re-raise unexpected exceptions on failure
If an exception is expected, but another one is raised, the CLITestContext raised a generic AssertionError. Pass through the original exception instead
Diffstat (limited to 'ipatests/test_cmdline')
-rw-r--r--ipatests/test_cmdline/test_help.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipatests/test_cmdline/test_help.py b/ipatests/test_cmdline/test_help.py
index 4cf633683..68684a925 100644
--- a/ipatests/test_cmdline/test_help.py
+++ b/ipatests/test_cmdline/test_help.py
@@ -52,7 +52,8 @@ class CLITestContext(object):
self.stdout_fileobj.close()
self.stderr_fileobj.close()
if self.exception:
- assert isinstance(exc_value, self.exception), exc_value
+ if not isinstance(exc_value, self.exception):
+ return False
self.exception = exc_value
return True