Closed godlygeek closed 4 months ago
Nope, this doesn't actually work. This gets anyio working, but pytest-memray doesn't wind up working (it just tracks the allocations of creating the coroutine, not of actually executing it).
I'll need to take another swing at this, marking as draft for now...
OK, this now actually works, and has a test to prove it.
anyio
allows runningasync def
test functions, but the wrapper installed by Memray to add tracking around the test function breaksanyio
's detection.Work around this by using an
async def
wrapper when the function being wrapped is a coroutine function.Closes #119