cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gauravaradhye <>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-8394: Use custom decorator to ...
Date Fri, 24 Apr 2015 08:51:35 GMT
GitHub user gauravaradhye opened a pull request:

    CLOUDSTACK-8394: Use custom decorator to skip test case

    When the tests are skipped through setUpClass, the statement "raise unittest.SkipTest()"
is used. This is seen as exception in the logs. To avoid this, alternatively we can set class
level variable in setUpClass and read this variable value in a custom decorator. Decorator
will skip or run test cases accordingly.
    This patch demonstrates that, when test is run on a hypervisor on which the feature is
not supported, we set "hypervisorNotSupported" variable to True and pass this variable as
argument to the decorator.
    Decorator gets the value of this attribute, examines it, if it's true, skips the test
case, or else runs the test case as it is.
    Also the expensive steps in setUpClass are run only if hypervisor is supported.
    Miscellaneous changes:
    1. Fix import *
    2. Remove unused variables

You can merge this pull request into a Git repository by running:

    $ git pull 8394

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #190
commit a0451060dd404eede895c847361b956b480c4010
Author: Gaurav Aradhye <>
Date:   2015-04-24T08:45:37Z

    CLOUDSTACK-8394: Use custom decorator to skip test case


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message