mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user