summaryrefslogtreecommitdiffstats
path: root/ipatests
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:30 +0200
commitf4c022a9cad559167d15625430f37897d601ea85 (patch)
treec3ce58fcddac45379c192ee84fadbd6666c07b9a /ipatests
parentb792520b8afdced97b163a5c3245f76981d84826 (diff)
downloadfreeipa-f4c022a9cad559167d15625430f37897d601ea85.tar.gz
freeipa-f4c022a9cad559167d15625430f37897d601ea85.tar.xz
freeipa-f4c022a9cad559167d15625430f37897d601ea85.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')
-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