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:
1 parent
5c06e27ff9
commit
ef2d61faa2
1 file changed
+2
-1
@@ -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