Open jakkdl opened 3 weeks ago
I'm making solid progress on this, but pytest-anyio does not support clocks/instruments (https://github.com/agronholm/anyio/issues/260), so will have to add that functionality
I'm making solid progress on this, but pytest-anyio does not support clocks/instruments (agronholm/anyio#260), so will have to add that functionality
okay this was pretty trivial.
https://anyio.readthedocs.io/en/stable/testing.html has a much cleaner implementation at a fraction of the code size: https://github.com/agronholm/anyio/blob/master/src/anyio/pytest_plugin.py
Discussions in Gitter also suggests people prefer running pytest-anyio in trio mode over directly running pytest-trio.
This would also resolve #137, #124, probably #123, #89, #57, and surely a whole host of other issues.
EDIT: it would also resolve the problem of yield raising
trio.Cancelled
and making teardown not get executed unless it's inside afinally:
https://pytest-trio.readthedocs.io/en/stable/reference.html#an-important-note-about-yield-fixtures