On 07/20/2012 05:25 PM, holger krekel wrote:
>> 1. How do I handle teardown for these setup functions? I would expect
>> they'd take a request and I'd do request.addfinalizer(...), but in some
>> of your examples they don't seem to take request, and in the one where
>> it does, it says "In addition to normal funcargs you can also receive
>> the “request” funcarg which represents a takes on each of the values in
>> the params=[1,2,3] decorator argument" - which I'm having trouble
>> parsing, and it isn't clear to me this request object would have
>> addfinalizer().
> 
> Let me fix the paragraph, it should read something like:
> 
>     This would execute the ``modes`` function once for each parameter
>     which will be put at ``request.param``.  This request object offers
>     the ``addfinalizer(func)`` helper which allows to register a function
>     which will be executed when test functions within the specified scope 
>     finished execution.
> 
> The ``request`` is a funcarg and thus setup functions can choose to
> receive it or not by stating it in their signature. It will always
> be available.  Depending on the scope, ``request.node`` will be the
> corresponding node i guess.

Yep, that would definitely clarify it.

Carl
_______________________________________________
py-dev mailing list
py-dev@codespeak.net
http://codespeak.net/mailman/listinfo/py-dev

Reply via email to