[pytest-dev] Using a context manager in a funcarg/fixture

Ronny Pfannschmidt Ronny.Pfannschmidt at gmx.de
Tue Apr 23 09:33:50 CEST 2013


Hi Holger, Brianna,

there is https://github.com/pelme/pytest-contextfixture
which seems to handle it for the time being

-- Ronny

On 04/23/2013 09:20 AM, holger krekel wrote:
> Hi Brianna,
>
> On Mon, Apr 22, 2013 at 15:48 +1000, Brianna Laugher wrote:
>> Hi folks,
>>
>> I posted this a couple of weeks ago and would appreciate if anyone can
>> offer a useful answer.
>>
>> http://stackoverflow.com/questions/15801662/py-test-how-to-use-a-context-manager-in-a-funcarg-fixture
>>
>> I feel like some kind of fixture definition that involves a yield statement
>> could be usefulfor this?
>
> I guess some playing around with adding direct support for context
> managers as fixtures could be interesting.  Not bound to do that anytime soon
> myself, though.
>
> holger
>
>> cheers
>> Brianna
>>
>>
>> --
>> They've just been waiting in a mountain for the right moment:
>> http://modernthings.org/
>
>> _______________________________________________
>> Pytest-dev mailing list
>> Pytest-dev at python.org
>> http://mail.python.org/mailman/listinfo/pytest-dev
>
> _______________________________________________
> Pytest-dev mailing list
> Pytest-dev at python.org
> http://mail.python.org/mailman/listinfo/pytest-dev



More information about the Pytest-dev mailing list