pytest-trio icon indicating copy to clipboard operation
pytest-trio copied to clipboard

Switch from pytest_runtest_call → pytest_runtest_setup?

Open njsmith opened this issue 7 years ago • 0 comments

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.

njsmith avatar Jul 24 '18 09:07 njsmith