On Sat, Oct 27, 2012 at 23:53 +0100, Floris Bruynooghe wrote: > On 26 October 2012 21:19, Ronny Pfannschmidt <ronny.pfannschm...@gmx.de> > wrote: > > i think just having the name setup will make people > > wonder about the teardown again > > > > if i correctly recall the name setup did > > cause people to misunderstand already > > (expecting a teardown of some kind) > > > > Unfortunately i cant think of a fit short name. > > @pytest.autofixture, but I'd be -1 on that. > > If the @pytest.setup shortcut is deemed required then a > @pytest.teardown shortcut could also be made for: > > @pytest.setup > def generated_teardown_func(request): > request.addfinalizer(original_teardown_func) > > I have no opinion on whether such shortcuts are useful, they are more > then one way to do things which makes me think they should not exist. > But if when talking to users and many examples show such usage as > common then maybe they should be considered. Personally I haven't > wanted a plain setup/teardown since funcargs so I tend to think they > are just people's resistance to change.
probably true and personally i have the same experience in my projects. However, due to its unittest/nose/trial support, py.test has a bit of a multi-paradigm approach. So i think it's sometimes ok to offer more than one way to do things because people are really coming from different backgrounds. However, i think Ronny also has a point remininding how it came to pytest.fixture instead of pytest.setup. So let's keep things how they are for now and if anything provide examples and help to people beginning to use them. best, holger > Regards, > Floris > _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev