fixed failed tests due to RaisesGroup

This commit is contained in:
mystical-prog
2024-10-26 21:19:23 +05:30
committed by Paul Robinson
parent 0be78be06a
commit 7495039a29
3 changed files with 26 additions and 11 deletions

View File

@ -67,7 +67,7 @@ async def test_single_protocol_fails(security_protocol):
# the StreamFailure is within 2 nested ExceptionGroups, so we use strict=False
# to unwrap down to the core Exception
with RaisesGroup(StreamFailure, strict=False):
with RaisesGroup(StreamFailure, allow_unwrapped=True, flatten_subgroups=True):
await perform_simple_test(
"", [PROTOCOL_ECHO], [PROTOCOL_POTATO], security_protocol
)
@ -112,7 +112,7 @@ async def test_multiple_protocol_fails(security_protocol):
# the StreamFailure is within 2 nested ExceptionGroups, so we use strict=False
# to unwrap down to the core Exception
with RaisesGroup(StreamFailure, strict=False):
with RaisesGroup(StreamFailure, allow_unwrapped=True, flatten_subgroups=True):
await perform_simple_test(
"", protocols_for_client, protocols_for_listener, security_protocol
)