[py-dev] using funcargs for setup/teardown
holger krekel
holger at merlinux.eu
Mon Oct 26 12:19:46 CET 2009
On Sun, Oct 25, 2009 at 18:28 +0000, Frederik Dohr wrote:
> > I'm considering writing two decorators to easily turn any function
> > into a setup or teardown method
>
> That's done now:
> http://gist.github.com/214495
>
> It was a good learning experience, and as such probably not flawless.
> (It's certainly more obscure than I'd like... )
not sure i see the need for funcargs with this example -
why don't you use the "traditional" setup_module/teardown_module
functions? (see http://codespeak.net/py/dist/test/xunit_setup.html)
best,
holger
More information about the Pytest-dev
mailing list