Skip to content

Commit 3029119

Browse files
authored
fix typo, clean up test_traceback_frame_removal (#3272)
1 parent ca218b2 commit 3029119

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/trio/_core/_tests/test_run.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,17 +2130,12 @@ def check_traceback(exc: KeyError) -> bool:
21302130
assert tb is not None
21312131
return tb.tb_frame.f_code is my_child_task.__code__
21322132

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

21452140

21462141
def test_contextvar_support() -> None:

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ deps =
6868
setuptools
6969
cython
7070
set_env =
71-
CFLAGS= -DCYTHON_TRACE_NOGIL=1A
71+
CFLAGS= -DCYTHON_TRACE_NOGIL=1
7272
allowlist_externals =
7373
sed
7474
cp

0 commit comments

Comments
 (0)