delfick / alt-pytest-asyncio

An alternative plugin for pytest to make it support async tests and fixtures
https://alt-pytest-asyncio.readthedocs.io
MIT License
27 stars 5 forks source link

asyncio: #10 shutdown_asyncgens #11

Closed delfick closed 3 years ago

delfick commented 3 years ago

Ensure any async generators that are left running past run_until_complete (essentially only if we get a KeyboardInterrupt that stops the run_until_complete) then those are finalized properly

Note I don't use loop.shutdown_asyncgens sothat I can make the generator handle an asyncio.CancelledError rather than a GeneratorExit

delfick commented 3 years ago

given the test only fails on 3.6 and in https://github.com/delfick/alt-pytest-asyncio/pull/9 I plan on making this project 3.7+ only, I'm gonna merge this after I merge that PR.

delfick commented 3 years ago

I decided I had time this morning to push this out and you can find it in 0.6.0 :)