Skip to content
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

options for run() args like strict_exception_groups #142

Open
belm0 opened this issue Mar 27, 2024 · 2 comments
Open

options for run() args like strict_exception_groups #142

belm0 opened this issue Mar 27, 2024 · 2 comments

Comments

@belm0
Copy link
Member

belm0 commented Mar 27, 2024

I'd like to set something in pytest.ini to call run() with a certainstrict_exception_groups value, so that it affects nursery fixtures, etc.

@belm0
Copy link
Member Author

belm0 commented Mar 27, 2024

hack:

import pytest_trio
pytest_trio.plugin.choose_run = lambda config: partial(trio.run, strict_exception_groups=False)

Why I want this: my package tests should be able to work with various versions of trio, including those prior to having any strict_exception_groups option.

@TeamSpen210
Copy link

Perhaps it should be a fixture, or maybe a mark - either way it'd be good to offer either forcing it to be true, false, or parametrising the test to run in both modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants