<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 6:52 AM, Sean Dague <span dir="ltr"><<a href="mailto:sean@dague.net" target="_blank">sean@dague.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12/04/2013 06:59 PM, Brant Knudson wrote:<br>
><br>
> In Keystone, we've got some tests that "raise self.skipTest('...')" in<br>
> the test class setUp() method (not setUpClass). My testing shows that if<br>
> there's several tests in the class then it shows all of those tests as<br>
> skipped (not just 1 skip). Does this do what you want?<br>
><br>
> Here's an example:<br>
> <a href="http://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/test_ipv6.py?id=73dbc00e6ac049f19d0069ecb07ca8ed75627dd5#n30" target="_blank">http://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/test_ipv6.py?id=73dbc00e6ac049f19d0069ecb07ca8ed75627dd5#n30</a><br>

><br>
> <a href="http://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/core.py?id=73dbc00e6ac049f19d0069ecb07ca8ed75627dd5#n500" target="_blank">http://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/core.py?id=73dbc00e6ac049f19d0069ecb07ca8ed75627dd5#n500</a><br>

<br>
</div>Our skipIf on the method does the same thing, because we rarely have a<br>
setUp. Realistically, Tempest tests are often a bit strange relative to<br>
testing you will see in project trees. Because Tempest is running tests<br>
on real resources, computes, cinder volumes, networks which can be very<br>
expensive to setup. This means that the bulk of the time in tempest<br>
tests is on setup.<br>
<br>
As a bunch of these tests aren't destructive to those resources, we<br>
cheat a little, and build them once in setUpClass. A naive convert to<br>
setUp would probably increase the Tempest run times by a factor of 6 to<br>
10. We have ideas about how to do a non naive convert... but it will be<br>
late cycle at best.<br>
<br>
All of this is a bit of a digression, but it seemed like useful context.<br>
<div class="HOEnZb"><div class="h5"><br>
        -Sean<br>
<br>
--<br>
Sean Dague<br>
<a href="http://dague.net" target="_blank">http://dague.net</a><br>
<br>
</div></div></blockquote></div></div><div class="gmail_extra"><br>Sean -<br><br></div><div class="gmail_extra">Thanks for the explanation. I wanted to make sure that we were doing the right thing in Keystone, too.<br><br>
</div><div class="gmail_extra">- Brant<br><br></div></div>