Skip to content

Switch from pytest_runtest_call → pytest_runtest_setup? #52

Open
@njsmith

Description

@njsmith

Right now we have to jump through hoops to make sure our pytest_runtest_call runs as early as possible, because it doesn't actually want to run anything, it just wants to patch the test object before the real pytest_runtest_call hook runs.

There's also a hook called pytest_runtest_setup which is... kind of designed for exactly this. It seems like we should use it?

Unfortunately when I tried this, I got 1 test failure: in test_async_test_as_class_method, for some reason the test method TestInClass.test_base is not being detected as a trio test. Pytest is very mysterious sometimes.

At some point it would be good to dig into this and figure out what's going on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions