On 12/04/2013 09:24 AM, Joe Hakim Rahme wrote: > I am in favor of class level exceptions for the obvious reasons: > > + It reduces code duplication. Copy/pasting a SkipIf decorator on every test > method in the class is tedious and possibly error prone. Adding the > exception > as a guard in the setUpClass() makes for a more elegant solution > > + function level skips will waste unnecessary time in the setup/teardown > methods. If I know I'm skipping all the tests in a class, why should I > bother > executing all the boilerplate preliminary actions? In the context of heavy > use, like the CI gate, this can accumulate and be a pain. > > + Using function level skips requires importing an extra module (from > testtools > import SkipIf) that would be otherwise unnecessary. > > If the output of the class level skipException needs to be improved, maybe > there > should be a patch there to list all the methods skipped. > > If proper fixtures are meant to replace setUpClass in the future (something I > would really love to see in Tempest), we still need to take into account that > setUpClass might do more than just fixtures, and certain guards are expected > to > be found in there. > > What do you guys think?
So I'd be ok with a compromise, which would build a decorator for the
setUpClass method, at least that would make it easier to refactor out later.
That will require someone signing up to writing that though.
-Sean
--
Sean Dague
http://dague.net
signature.asc
Description: OpenPGP digital signature
_______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
