On Fri, 2011-04-29 at 11:45 +0000, holger krekel wrote: > Hi Ronny, > > On Wed, Apr 20, 2011 at 22:47 +0200, Ronny Pfannschmidt wrote: > > hi, > > > > i just tried a initial implementation of generic funcargs > > to solve the issue i introduced the hook > > pytest_reconfigure_funcargs(request) > > > > the current patch is at > > https://bitbucket.org/RonnyPfannschmidt/pytest-patches/qseries?apply=t&qs_apply=reconfigure-funcargs > > Can you detail your use case? > in the setup for the bitbucket hook tests of pypy i have a little mess of interacting funcargs (im intercepting various calls by default) that also needs some additional funcargs to functions that shouldn't need them
so having a generic hook to set the interaction between up would be helpful > If anything i'd rather go for a hook that would implement the whole > funcarg filling protocol. This way one could use generic mechanisms (*) > for forcing to execute first/last or wrapping the default protocol. > I'd also like to have such a hook get called even if there are no > function arguments present. It would allow to make use of > request.cached_setup() with session scopes to setup global state > for use by Python code. > i suppose a pytest_configure_funcargs(request) hook should do the builtin implementation would be a tryfirst, my use of "reconfigure" would be the same -- Ronny > best, > holger > > (*) you can decorate any hook impl with @pytest.mark.trylast, > @pytest.mark.tryfirst and you may accept the special __multicall__ arg. > these are not yet documented features but they are used in internal > plugins - see there for examples. However, i guess the API is ripe > to be documented and published sometime. > > > > regards, > > Ronny > > > > > _______________________________________________ > > py-dev mailing list > > py-dev@codespeak.net > > http://codespeak.net/mailman/listinfo/py-dev >
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