On Sun, 2011-05-01 at 11:59 +0200, Baptiste Lepilleur wrote: > 2011/4/29 Ronny Pfannschmidt <ronny.pfannschm...@gmx.de> > > On Fri, 2011-04-29 at 22:18 +0200, Baptiste Lepilleur wrote: > > [...] > > I'm not sure how I would go about that: it would means going > through > > the VALIDATION_SCENARIOS test data for each test function, > and > > duplicating some setup code of the test function... > > > unless i'm misstaken, only the creation of the class is shared > which means that could actually be something like a funcarg or > a param > to a funcarg > > > Indeed. I did the split but I feel that the scenario types/test > function association is very clumsy: > http://pastebin.com/gTsVJLWK > > > Is there a simpler way to do this? Ideally, I'd rather have a simple > way to associate a test function with a test parameter generator. I'm > thinking of something like this for example: > > > @parametrized( _generate_property_validation_tests, ['good_values'] ) > def test_property_validation_good_values( scenario_type, dbo_class, > value, good_value ): > ... > > > The parametrized decorator would > call _generate_property_validation_tests( metafunc, ['good_values'] ). > > > Is there a way to do that? you can use the pytest.mark tool to make a decorator which annotates the value types nicely
-- Ronny > > > Thanks, > Baptiste. > > > -- Ronny > >
signature.asc
Description: This is a digitally signed message part
_______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev