From ef2d61faa2d76924fb20b0883da03b4e9f7087a4 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 10 Jul 2013 16:22:41 +0200 Subject: 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 --- ipatests/test_cmdline/test_help.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit