[virt-tools-list] [virt-manager PATCH 1/4] tests/virtconvtest: raise an exception if unar is missing
Cole Robinson
crobinso at redhat.com
Tue Jul 14 17:00:38 UTC 2015
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 at redhat.com>
> ---
> 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
More information about the virt-tools-list
mailing list