Skip to content

Commit 42c9837

Browse files
authored
Merge pull request #155 from python-trio/mikenerone/fix-tests-raisesgroup-strict
fix RaisesGroup(strict=...) in tests, removed in trio 0.27
2 parents ad53a45 + d74158d commit 42c9837

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

.readthedocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ python:
1515
- requirements: docs-requirements.txt
1616

1717
sphinx:
18+
configuration: docs/source/conf.py
1819
fail_on_warning: true

docs/source/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@
132132
# html_theme_options.
133133
import sphinx_rtd_theme
134134
html_theme = 'sphinx_rtd_theme'
135-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
136135

137136
# Theme options are theme-specific and customize the look and feel of a theme
138137
# further. For a list of options available for each theme, see the

test-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ pytest-cov
33
pytest-trio
44
outcome
55
pytest-timeout
6-
trio >= 0.25.0
6+
trio >= 0.26.0

tests/test_misc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ def collect_exceptions(loop, context):
333333
)
334334
expected = [ValueError("hi"), ValueError("lo"), KeyError(), IndexError()]
335335
await raise_in_aio_loop(expected[0])
336-
with trio.testing.RaisesGroup(SystemExit, strict=False):
336+
with trio.testing.RaisesGroup(SystemExit, flatten_subgroups=True):
337337
await raise_in_aio_loop(SystemExit(0))
338-
with trio.testing.RaisesGroup(SystemExit, strict=False) as result:
338+
with trio.testing.RaisesGroup(SystemExit, flatten_subgroups=True) as result:
339339
await raise_in_aio_loop(BaseExceptionGroup("", [expected[1], SystemExit()]))
340340

341341
assert len(result.value.exceptions) == 1

tests/test_trio_asyncio.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async def test_cancel_loop_with_tasks(autojump_clock, shield, body_raises):
124124

125125
if body_raises:
126126
catcher = trio.testing.RaisesGroup(
127-
trio.testing.Matcher(ValueError, match="hi"), strict=False
127+
trio.testing.Matcher(ValueError, match="hi"), flatten_subgroups=True
128128
)
129129
else:
130130
catcher = contextlib.nullcontext()

0 commit comments

Comments
 (0)