-
-
Notifications
You must be signed in to change notification settings - Fork 27
Description
We don't want to do this by default, because then we get into the situation where all the different pytest-{asyncio,trio,curio,...} plugins fight over which tests are theirs. And we want to preserve the option to mark individual tests with @pytest.mark.trio, for projects that want to use multiple pytest-* plugins at the same time.
But for the common case of a project that uses only trio, there should be some way to opt-in to automatic detection of async tests as trio tests.
An option in pytest.ini is one obvious thing. We should also give a way for conftest.py to opt-in directly, for the use of projects that ship their tests along with their source code but can't easily ship a pytest.ini.
What would be really neat was if we could limit the conftest.py opt-in to the subdirectory that conftest.py applies to. I'm not sure if there's a way to do that.