There are a few slightly better ways of doing this.
Class UsageEnumsMixinIn
....stuff
class TestDistributionUsageEnums(TestCaseWithFactory, UsageEnumsMixin):
...
class TestProductUsageEnums(TestCaseWithFactory, UsageEnumsMixin):
...
is one.
Another is to use testscenarios, and your parameterisation would be
more explicit, but we don't use that in lp today AFAIK, so I won't
suggest adding it in (but you could get much the same helpers from
bzrlib.testing).
These are better because they don't have a class that looks-to-loaders
like a valid test case, but isn't.
On Sat, Aug 21, 2010 at 9:58 AM, j.c.sackett
<email address hidden> wrote:
> + estCase ionUsageEnums" , ageEnums" , TestLoader( ).loadTestsFrom Names(test_ list)
> +# Manually create the TestLoader list, because the UsageEnumsBaseT
> +# shouldn't run.
> +test_list = [
> + __name__ + ".TestDistribut
> + __name__ + ".TestProductUs
> + ]
> +
> +
> +def test_suite():
> + return unittest.
There are a few slightly better ways of doing this.
Class UsageEnumsMixinIn
....stuff
class TestDistributio nUsageEnums( TestCaseWithFac tory, UsageEnumsMixin):
...
class TestProductUsag eEnums( TestCaseWithFac tory, UsageEnumsMixin):
...
is one.
Another is to use testscenarios, and your parameterisation would be
more explicit, but we don't use that in lp today AFAIK, so I won't
suggest adding it in (but you could get much the same helpers from
bzrlib.testing).
These are better because they don't have a class that looks-to-loaders
like a valid test case, but isn't.
-Rob