Re: [virt-manager PATCH 1/4] tests/virtconvtest: raise an exception if unar is missing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/10/2015 08:07 AM, Pavel Hrdina wrote:
> If you are running all tests, we should raise an exception, if something
> is missing instead of silently ignore that tests.
> 
> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> ---
>  tests/virtconvtest.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/virtconvtest.py b/tests/virtconvtest.py
> index e3f397b..8241563 100644
> --- a/tests/virtconvtest.py
> +++ b/tests/virtconvtest.py
> @@ -68,7 +68,7 @@ class TestVirtConv(unittest.TestCase):
>  
>          if (os.path.splitext(in_path)[1] in [".zip"] and
>              not find_executable("unar")):
> -            return
> +            raise RuntimeError("Install 'unar' to run all tests.")
>  
>          try:
>              os.chdir(os.path.dirname(in_path))
> 

Actually I think it's better to skip the test here, can use self.skipTest(msg)
to do that. I changed the commit and pushed

Thanks,
Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux