Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions src/trio/_core/_tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2130,17 +2130,12 @@ def check_traceback(exc: KeyError) -> bool:
assert tb is not None
return tb.tb_frame.f_code is my_child_task.__code__

expected_exception = Matcher(KeyError, check=check_traceback)

with RaisesGroup(expected_exception, expected_exception):
# Trick: For now cancel/nursery scopes still leave a bunch of tb gunk
# behind. But if there's an ExceptionGroup, they leave it on the group,
# which lets us get a clean look at the KeyError itself. Someday I
# guess this will always be an ExceptionGroup (#611), but for now we can
# force it by raising two exceptions.
with RaisesGroup(Matcher(KeyError, check=check_traceback)):
# For now cancel/nursery scopes still leave a bunch of tb gunk behind.
# But if there's an Exceptiongroup, they leave it on the group,
# which lets us get a clean look at the KeyError itself.
async with _core.open_nursery() as nursery:
nursery.start_soon(my_child_task)
nursery.start_soon(my_child_task)


def test_contextvar_support() -> None:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ deps =
setuptools
cython
set_env =
CFLAGS= -DCYTHON_TRACE_NOGIL=1A
CFLAGS= -DCYTHON_TRACE_NOGIL=1
allowlist_externals =
sed
cp
Expand Down
Loading