[libvirt] [test-API PATCHv2 1/2] utils: Add exception for general test errors

Guannan Ren gren at redhat.com
Thu Apr 5 12:29:09 UTC 2012


On 04/05/2012 07:58 PM, Peter Krempa wrote:
> This helper exception helps with reporting test errors that don't
> produce a libvirt exception. Eg. comparison of returned and expected
> value fails although the api call succeeded.
> ---
> Diff to v1:
> -- moved the new exception to the exception module
>
>   exception.py |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/exception.py b/exception.py
> index 0000aab..d0a772f 100644
> --- a/exception.py
> +++ b/exception.py
> @@ -75,3 +75,7 @@ class CaseConfigfileError(LibvirtException):
>   class MissingVariable(LibvirtException):
>       code = 210
>       message = "Variables missing from env.cfg [variables] section"
> +
> +class TestError(LibvirtException):
> +    code = 211
> +    message = "Test failed"

     If you really want to use this TestError in testcase, I am okay.
     Thanks.
     ACK and pushed.

     Guannan Ren




More information about the libvir-list mailing list