pytest-trio
pytest-trio copied to clipboard
options for `run()` args like `strict_exception_groups`
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.
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.
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.