Skip to content

Refactor everything and use the same logic as pytest-anyio #147

@jakkdl

Description

@jakkdl

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 a finally: https://pytest-trio.readthedocs.io/en/stable/reference.html#an-important-note-about-yield-fixtures

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions