-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor everything and use the same logic as pytest-anyio #147
Comments
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.
|
@jakkdl, I took a brief look, and it seems that I looked into what it would take to convert the existing In any event, those are problems I don't need to solve for my use case, so I think I will end my investigation here. I'll continue with my own workaround unless/until this plugin is updated. Good luck with your proposed refactor. |
yeah the biggest hurdle to any redesign is keeping feature parity with current pytest-trio (other than removal of concurrent fixture execution). But your approach looks very interesting, and I think it would be great if it was available Somewhere ™️ for others with the same requirement. If you wanna host a repo for it we could at least link it from https://trio.readthedocs.io/en/stable/awesome-trio-libraries.html |
progress on WIP PR is currently blocked by agronholm/anyio#805 |
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-fixturesThe text was updated successfully, but these errors were encountered: