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:
Petr Viktorin
2013-07-10 16:22:41 +02:00
parent 5c06e27ff9
commit ef2d61faa2

View File

@@ -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