Right now the nursery fixture is implemented in a pretty hacky way by patching the item object given by pytest:
|
@pytest.fixture |
|
async def nursery(request): |
|
return request.node._trio_nursery |
I wonder if it wouldn't be better to use the contextvars feature now that it is availble (even in older version of python thanks to Yury's backport https://github.com/MagicStack/contextvars)