You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from pytest_trio.enable_trio_mode import * doesn't work properly if your conftest.py itself implements pytest_collection_modifyitems or pytest_fixture_setup hooks. It seems the hooks from pytest_trio get shadowed by your local function so the pytest_trio hooks no longer get found and called by pytest.
Maybe at least add this behavior (and a recommended workaround) to the documentation?
I unblocked by having my local hooks call the pytest_trio versions of these hooks internally. (Possibly pytest hookwrapper could also be used?)
Probably better would be to have pytest_trio's pytest_collection_modifyitems and pytest_fixture_setup be in the main pytest_trio plugin, and have their behavior be configurable? Then I think they'll always be collected by pytest.
The text was updated successfully, but these errors were encountered:
from pytest_trio.enable_trio_mode import *
doesn't work properly if your conftest.py itself implementspytest_collection_modifyitems
orpytest_fixture_setup
hooks. It seems the hooks from pytest_trio get shadowed by your local function so the pytest_trio hooks no longer get found and called by pytest.Maybe at least add this behavior (and a recommended workaround) to the documentation?
I unblocked by having my local hooks call the pytest_trio versions of these hooks internally. (Possibly pytest hookwrapper could also be used?)
Probably better would be to have pytest_trio's
pytest_collection_modifyitems
andpytest_fixture_setup
be in the main pytest_trio plugin, and have their behavior be configurable? Then I think they'll always be collected by pytest.The text was updated successfully, but these errors were encountered: