-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to automatically treat all async tests as trio tests #9
Comments
I guess one option for marking things in conftest would be to tell people to write from pytest_trio.automark import * where This is evil and magical: the idea is to exploit pytest's magic where every |
Fixes python-triogh-9 Documentation in python-triogh-47
Fixes python-triogh-9 Documentation in python-triogh-47
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 forconftest.py
to opt-in directly, for the use of projects that ship their tests along with their source code but can't easily ship apytest.ini
.What would be really neat was if we could limit the
conftest.py
opt-in to the subdirectory thatconftest.py
applies to. I'm not sure if there's a way to do that.The text was updated successfully, but these errors were encountered: